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_quit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cmd_quit.cpp') diff --git a/src/cmd_quit.cpp b/src/cmd_quit.cpp index bf64aea3d..41cc48c8e 100644 --- a/src/cmd_quit.cpp +++ b/src/cmd_quit.cpp @@ -99,8 +99,9 @@ CmdResult cmd_quit::Handle (const char** parameters, int pcnt, userrec *user) if (user->registered == REG_ALL) { user->PurgeEmptyChannels(); } - DELETE(user); - return CMD_SUCCESS; + FOREACH_MOD(I_OnPostCommand,OnPostCommand("QUIT", parameters, pcnt, user, CMD_SUCCESS)); + DELETE(user); + return CMD_USER_DELETED; } -- cgit v1.3.1-10-gc9f91