From 5f9c2b3c97ed1eeb19270fd3582b71ca8e1ca1ac Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 10 Jul 2026 11:15:52 +0100 Subject: Use saturating adds/subtracts when handling timestamps. --- src/commands.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/commands.cpp') diff --git a/src/commands.cpp b/src/commands.cpp index 25dcb09fb..51c7805ad 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -27,6 +27,7 @@ #include "inspircd.h" #include "numerichelper.h" #include "stringutils.h" +#include "timeutils.h" #include "utility/container.h" bool CommandParser::LoopCall(User* user, Command* handler, const CommandBase::Params& parameters, size_t splithere, size_t extra, bool usemax) @@ -229,7 +230,7 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman } /* activity resets the ping pending timer */ - user->nextping = ServerInstance->Time() + user->GetClass()->pingtime; + user->nextping = Time::In(user->GetClass()->pingtime); switch (handler->access_needed) { case CmdAccess::NORMAL: -- cgit v1.3.1-10-gc9f91