From 168ee804903e5ee10edc04e870e36a1256885e34 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 15 Feb 2019 10:56:08 +0000 Subject: Rename User::nping to nextping for consistency with lastping. --- src/usermanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/usermanager.cpp') diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 4ab13fc95..40e0096a2 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -52,13 +52,13 @@ namespace void CheckPingTimeout(LocalUser* user) { // Check if it is time to ping the user yet. - if (ServerInstance->Time() < user->nping) + if (ServerInstance->Time() < user->nextping) return; // This user didn't answer the last ping, remove them. if (!user->lastping) { - time_t secs = ServerInstance->Time() - (user->nping - user->MyClass->GetPingTime()); + time_t secs = ServerInstance->Time() - (user->nextping - user->MyClass->GetPingTime()); const std::string message = "Ping timeout: " + ConvToStr(secs) + (secs != 1 ? " seconds" : " second"); ServerInstance->Users.QuitUser(user, message); return; @@ -68,7 +68,7 @@ namespace ClientProtocol::Messages::Ping ping; user->Send(ServerInstance->GetRFCEvents().ping, ping); user->lastping = 0; - user->nping = ServerInstance->Time() + user->MyClass->GetPingTime(); + user->nextping = ServerInstance->Time() + user->MyClass->GetPingTime(); } void CheckRegistrationTimeout(LocalUser* user) -- cgit v1.3.1-10-gc9f91