- User *u = *a;
- // user has been moved onto their UID; that's why this isn't find(u->nick)
- user_hash::iterator iter = ServerInstance->Users->clientlist->find(u->uuid);
-
- if (u->registered != REG_ALL)
- if (ServerInstance->Users->unregistered_count)
- ServerInstance->Users->unregistered_count--;
-
- if (IS_LOCAL(u))
- {
- if (!u->sendq.empty())
- u->FlushWriteBuf();
-
- if (u->GetIOHook())
- {
- try
- {
- u->GetIOHook()->OnRawSocketClose(u->GetFd());
- }
- catch (CoreException& modexcept)
- {
- ServerInstance->Logs->Log("CULLLIST",DEBUG, "%s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason());
- }
- }
-
- ServerInstance->SE->DelFd(u);
- u->CloseSocket();
- }
-
- /*
- * this must come before the ServerInstance->SNO->WriteToSnoMaskso that it doesnt try to fill their buffer with anything
- * if they were an oper with +sn +qQ.
- */
- if (u->registered == REG_ALL)