From 6fc111ccb6650a67f014977b2e7ebc2fb5b16790 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 29 Oct 2022 15:44:01 +0100 Subject: Rename session registration to connection to avoid a semantic conflict. We previously referred to both session registration and user registration as "registration" which is confusing for users who aren't familiar with how IRC works. --- src/usermanager.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/usermanager.cpp') diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 5e33002bc..041d32d3b 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -80,13 +80,13 @@ namespace user->nextping = ServerInstance->Time() + user->GetClass()->pingtime; } - void CheckRegistrationTimeout(LocalUser* user) + void CheckConnectionTimeout(LocalUser* user) { - if (user->GetClass() && (ServerInstance->Time() > static_cast(user->signon + user->GetClass()->registration_timeout))) + if (user->GetClass() && (ServerInstance->Time() > static_cast(user->signon + user->GetClass()->connection_timeout))) { - // Either the user did not send NICK/USER or a module blocked registration in + // Either the user did not send NICK/USER or a module blocked connection in // OnCheckReady until the client timed out. - ServerInstance->Users.QuitUser(user, "Registration timeout"); + ServerInstance->Users.QuitUser(user, "Connection timeout"); } } @@ -104,7 +104,7 @@ namespace // If the user has been quit in OnCheckReady then we shouldn't quit // them again for having a registration timeout. if (!user->quitting) - CheckRegistrationTimeout(user); + CheckConnectionTimeout(user); } } @@ -127,7 +127,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs ServerInstance->Logs.Debug("USERS", "New user fd: %d", socket); - this->unregistered_count++; + this->unknown_count++; this->clientlist[New->nick] = New; this->AddClone(New); this->local_users.push_front(New); @@ -283,7 +283,7 @@ void UserManager::QuitUser(User* user, const std::string& quitmessage, const std WriteCommonQuit(user, quitmsg, operquitmsg); } else - unregistered_count--; + unknown_count--; if (IS_LOCAL(user)) { @@ -351,7 +351,7 @@ const UserManager::CloneCounts& UserManager::GetCloneCounts(User* user) const /** * This function is called once a second from the mainloop. * It is intended to do background checking on all the users, e.g. do - * ping checks, registration timeouts, etc. + * ping checks, connection timeouts, etc. */ void UserManager::DoBackgroundUserStuff() { @@ -371,18 +371,18 @@ void UserManager::DoBackgroundUserStuff() curr->eh.OnDataReady(); } - switch (curr->registered) + switch (curr->connected) { - case REG_ALL: + case User::CONN_FULL: CheckPingTimeout(curr); break; - case REG_NICKUSER: + case User::CONN_NICKUSER: CheckModulesReady(curr); break; default: - CheckRegistrationTimeout(curr); + CheckConnectionTimeout(curr); break; } } -- cgit v1.3.1-10-gc9f91