diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-04-20 17:40:12 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-04-20 17:40:12 +0200 |
commit | 8f5efbc7aa33b792e02d01e3288f553e6e98ccaa (patch) | |
tree | 54a67ebd11fac07d630fa03acad7797b2f781e80 /src/usermanager.cpp | |
parent | dda1d696c1316b09d65763b4f12bc2b63cfbbe72 (diff) | |
parent | 1548078e5dc304814669cd1ea052f92be9d1ac40 (diff) |
Merge insp20
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r-- | src/usermanager.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 1966c9b47..4ebc3b583 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -93,7 +93,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs this->clientlist[New->nick] = New; New->registered = REG_NONE; - New->signon = ServerInstance->Time() + ServerInstance->Config->dns_timeout; + New->signon = ServerInstance->Time(); New->lastping = 1; this->AddClone(New); @@ -254,6 +254,18 @@ void UserManager::RemoveCloneCounts(User *user) } } +void UserManager::RehashCloneCounts() +{ + clonemap.clear(); + + const user_hash& hash = ServerInstance->Users.GetUsers(); + for (user_hash::const_iterator i = hash.begin(); i != hash.end(); ++i) + { + User* u = i->second; + AddClone(u); + } +} + const UserManager::CloneCounts& UserManager::GetCloneCounts(User* user) const { CloneMap::const_iterator it = clonemap.find(user->GetCIDRMask()); @@ -348,10 +360,15 @@ void UserManager::DoBackgroundUserStuff() curr->FullConnect(); continue; } + + // If the user has been quit in OnCheckReady then we shouldn't + // quit them again for having a registration timeout. + if (curr->quitting) + continue; break; } - if (curr->registered != REG_ALL && (ServerInstance->Time() > (curr->age + curr->MyClass->GetRegTimeout()))) + if (curr->registered != REG_ALL && curr->MyClass && (ServerInstance->Time() > (curr->signon + curr->MyClass->GetRegTimeout()))) { /* * registration timeout -- didnt send USER/NICK/HOST |