diff options
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp index 44947fa6c..e4f63e3ba 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -766,7 +766,11 @@ void userrec::QuitUser(InspIRCd* Instance, userrec *user, const std::string &qui if (reason.length() > MAXQUIT - 1) reason.resize(MAXQUIT - 1); - + + if (user->registered != REG_ALL) + if (Instance->unregistered_count) + Instance->unregistered_count--; + if (IS_LOCAL(user)) { user->Write("ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,reason.c_str()); @@ -983,6 +987,8 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, userrec* New; int j = 0; + Instance->unregistered_count++; + /* * fix by brain. * as these nicknames are 'RFC impossible', we can be sure nobody is going to be @@ -1177,6 +1183,10 @@ void userrec::FullConnect(CullList* Goners) this->ShowMOTD(); + /* Now registered */ + if (ServerInstance->unregistered_count) + ServerInstance->unregistered_count--; + /* * fix 3 by brain, move registered = 7 below these so that spurious modes and host * changes dont go out onto the network and produce 'fake direction'. |