summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-02-15 10:56:08 +0000
committerPeter Powell <petpow@saberuk.com>2019-02-15 11:35:25 +0000
commit168ee804903e5ee10edc04e870e36a1256885e34 (patch)
treeb50842f0c177515f4fa4e1ff0682a8bb652c0642 /src
parentf5b2265c2e6868431abbaa301aa1d64e8d49d8b0 (diff)
Rename User::nping to nextping for consistency with lastping.
Diffstat (limited to 'src')
-rw-r--r--src/command_parse.cpp2
-rw-r--r--src/usermanager.cpp6
-rw-r--r--src/users.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 7a732f8b5..533c7e281 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -246,7 +246,7 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman
return;
/* activity resets the ping pending timer */
- user->nping = ServerInstance->Time() + user->MyClass->GetPingTime();
+ user->nextping = ServerInstance->Time() + user->MyClass->GetPingTime();
if (handler->flags_needed)
{
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)
diff --git a/src/users.cpp b/src/users.cpp
index 582abe17e..4050337c7 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -97,7 +97,7 @@ LocalUser::LocalUser(int myfd, irc::sockets::sockaddrs* client, irc::sockets::so
, quitting_sendq(false)
, lastping(true)
, exempt(false)
- , nping(0)
+ , nextping(0)
, idle_lastmsg(0)
, CommandFloodPenalty(0)
, already_sent(0)
@@ -503,7 +503,7 @@ void LocalUser::CheckClass(bool clone_count)
}
}
- this->nping = ServerInstance->Time() + a->GetPingTime();
+ this->nextping = ServerInstance->Time() + a->GetPingTime();
}
bool LocalUser::CheckLines(bool doZline)