From c06d4197afe3830ab6c28d55e8889d1cad36282c Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 13 Sep 2006 20:07:19 +0000 Subject: Special check in cmd_quit and cmd_kill and special return value CMD_USER_DELETED, to prevent theoretical segfault (this isnt the bug youre trying to find, pip) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5230 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_kill.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cmd_kill.cpp') diff --git a/src/cmd_kill.cpp b/src/cmd_kill.cpp index 6fe855a19..dfcf99590 100644 --- a/src/cmd_kill.cpp +++ b/src/cmd_kill.cpp @@ -66,6 +66,11 @@ CmdResult cmd_kill::Handle (const char** parameters, int pcnt, userrec *user) u->PurgeEmptyChannels(); } + if (u == user) + { + FOREACH_MOD(I_OnPostCommand,OnPostCommand("KILL", parameters, pcnt, user, CMD_SUCCESS)); + return CMD_USER_DELETED; + } DELETE(u); } else -- cgit v1.3.1-10-gc9f91