From ddb970dd670bcd905c8f34458f8fcf70e9fd89bd Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 19 Feb 2007 08:38:26 +0000 Subject: 1) Fix for nickname overruled with new cullList stuff -- we have to change their nick, its not safe to quit them as it messes up the nick hash. 2) Add a mute flag for users, so we can drop commands from users who have been placed on the cullList. This is independent of the actual cullList and can be used as a general mute flag e.g. by shun modules. 3) Fix /kill to also not quit the user immediately, remove need for CMD_USER_DELETED return anywhere in the code. *** THIS NEEDS TESTING BY QA *** git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6596 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_kill.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'src/cmd_kill.cpp') diff --git a/src/cmd_kill.cpp b/src/cmd_kill.cpp index d0de52b8d..ae327166d 100644 --- a/src/cmd_kill.cpp +++ b/src/cmd_kill.cpp @@ -50,23 +50,7 @@ CmdResult cmd_kill::Handle (const char** parameters, int pcnt, userrec *user) u->WriteCommonExcept("QUIT :%s", killreason); FOREACH_MOD(I_OnRemoteKill, OnRemoteKill(user, u, killreason)); - user_hash::iterator iter = ServerInstance->clientlist->find(u->nick); - - if (iter != ServerInstance->clientlist->end()) - ServerInstance->clientlist->erase(iter); - - if (u->registered == REG_ALL) - { - u->PurgeEmptyChannels(); - } - - if (u == user) - { - std::string original_command = std::string("KILL ") + u->nick + " :"+parameters[1]; - FOREACH_MOD(I_OnPostCommand,OnPostCommand("KILL", parameters, pcnt, user, CMD_SUCCESS,original_command)); - return CMD_USER_DELETED; - } - DELETE(u); + userrec::QuitUser(ServerInstance, u, parameters[1]); } else { @@ -75,10 +59,8 @@ CmdResult cmd_kill::Handle (const char** parameters, int pcnt, userrec *user) user->WriteTo(u, "KILL %s :%s!%s!%s (%s)", u->nick, ServerInstance->Config->ServerName, user->dhost, user->nick, parameters[1]); ServerInstance->SNO->WriteToSnoMask('k',"Local Kill by %s: %s!%s@%s (%s)", user->nick, u->nick, u->ident, u->host, parameters[1]); snprintf(killreason,MAXQUIT,"Killed (%s (%s))", user->nick, parameters[1]); - userrec::QuitUser(ServerInstance, u, killreason); - if (u == user) - return CMD_USER_DELETED; + userrec::QuitUser(ServerInstance, u, killreason); } } else -- cgit v1.3.1-10-gc9f91