diff options
| author | 2021-01-31 14:00:34 +0000 | |
|---|---|---|
| committer | 2021-01-31 14:00:34 +0000 | |
| commit | 2b2d37ff506dd02f546585fa345ceb56e8007697 (patch) | |
| tree | 89a4a0c472dd6855577b6e97f478b0a0806da5b2 /src/usermanager.cpp | |
| parent | Move sendmsglist to above the functions in LocalUser. (diff) | |
Make MyClass private and move everything to GetClass.
Diffstat (limited to 'src/usermanager.cpp')
| -rw-r--r-- | src/usermanager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 5aefcfc10..7deefacd2 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -71,11 +71,11 @@ namespace { // A module is preventing this user from being timed out. user->lastping = 1; - user->nextping = ServerInstance->Time() + user->MyClass->GetPingTime(); + user->nextping = ServerInstance->Time() + user->GetClass()->GetPingTime(); return; } - time_t secs = ServerInstance->Time() - (user->nextping - user->MyClass->GetPingTime()); + time_t secs = ServerInstance->Time() - (user->nextping - user->GetClass()->GetPingTime()); const std::string message = "Ping timeout: " + ConvToStr(secs) + (secs != 1 ? " seconds" : " second"); ServerInstance->Users.QuitUser(user, message); return; @@ -85,7 +85,7 @@ namespace ClientProtocol::Messages::Ping ping; user->Send(ServerInstance->GetRFCEvents().ping, ping); user->lastping = 0; - user->nextping = ServerInstance->Time() + user->MyClass->GetPingTime(); + user->nextping = ServerInstance->Time() + user->GetClass()->GetPingTime(); } void CheckRegistrationTimeout(LocalUser* user) @@ -394,7 +394,7 @@ void UserManager::DoBackgroundUserStuff() if (curr->CommandFloodPenalty || curr->eh.GetSendQSize()) { - unsigned int rate = curr->MyClass->GetCommandRate(); + unsigned int rate = curr->GetClass()->GetCommandRate(); if (curr->CommandFloodPenalty > rate) curr->CommandFloodPenalty -= rate; else |
