- // unset their oper type (what IS_OPER checks), and remove +o
- *this->oper = 0;
- this->modes[UM_OPERATOR] = 0;
-
- // remove the user from the oper list. Will remove multiple entries as a safeguard against bug #404
- ServerInstance->all_opers.remove(this);
- }
- }
-
- catch (...)
- {
- ServerInstance->Log(DEBUG,"Exception in User::UnOper()");
- }
-}
-
-void User::QuitUser(InspIRCd* Instance, User *user, const std::string &quitreason, const char* operreason)
-{
- Instance->Log(DEBUG,"QuitUser: %s '%s'", user->nick, quitreason.c_str());
- user->Write("ERROR :Closing link (%s@%s) [%s]", user->ident, user->host, *operreason ? operreason : quitreason.c_str());
- user->muted = true;
- Instance->GlobalCulls.AddItem(user, quitreason.c_str(), operreason);
-}
-
-/* adds or updates an entry in the whowas list */
-void User::AddToWhoWas()
-{
- Command* whowas_command = ServerInstance->Parser->GetHandler("WHOWAS");
- if (whowas_command)
- {
- std::deque<classbase*> params;
- params.push_back(this);
- whowas_command->HandleInternal(WHOWAS_ADD, params);
- }
-}
-
-/* add a client connection to the sockets list */
-void User::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, int socketfamily, sockaddr* ip)
-{
- /* NOTE: Calling this one parameter constructor for User automatically
- * allocates a new UUID and places it in the hash_map.
- */
- User* New = NULL;
- try
- {
- New = new User(Instance);
- }
- catch (...)
- {
- Instance->Log(DEFAULT,"*** WTF *** Duplicated UUID! -- Crack smoking monkies have been unleashed.");
- Instance->WriteOpers("*** WARNING *** Duplicate UUID allocated!");
- return;
- }
-
- Instance->Log(DEBUG,"New user fd: %d", socket);
-
- int j = 0;