summaryrefslogtreecommitdiff
path: root/src/cmd_kill.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-11 12:15:11 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-11 12:15:11 +0000
commite4694e467513a7d4d298e55027e58bf9a7917958 (patch)
treef63fdf9bee5aeca2f58cf2f9d11422fe8858ee6c /src/cmd_kill.cpp
parenta1f682a211c3a073143d4ece7a2ea915a5ff089b (diff)
Oops, add special-case for user killing themselves (their userrec is gone when the function returns)
Also put checks in LoopCall to check that the user didnt vanish half way through the comma seperated list, if they did, abort at that element of the list. This means if your nick is 'a' and you do "/kill b,c,a,f,g die" only you, b and c will be removed from irc. (this is to be expected, really) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5684 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_kill.cpp')
-rw-r--r--src/cmd_kill.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd_kill.cpp b/src/cmd_kill.cpp
index fb5dba245..e2a8d8824 100644
--- a/src/cmd_kill.cpp
+++ b/src/cmd_kill.cpp
@@ -88,6 +88,9 @@ CmdResult cmd_kill::Handle (const char** parameters, int pcnt, userrec *user)
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;
}
}
else