From 098157dca8a4aecc18294cbc31cbe5ee95b35a94 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 3 Jan 2013 11:41:32 -0500 Subject: Don't delete users immediately when quit or killed, instead wait until message processing is done --- src/command.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/command.cpp') diff --git a/src/command.cpp b/src/command.cpp index 887967626..c737897e5 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -262,13 +262,10 @@ void RunCommand(CommandSource &source, const Anope::string &message) return; } - bool had_u = source.GetUser(), had_nc = source.nc; - Reference user_reference(source.GetUser()); Reference nc_reference(source.nc); c->Execute(source, params); - if (had_u == user_reference && had_nc == nc_reference) - { - FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, c, params)); - } + if (!nc_reference) + source.nc = NULL; + FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, c, params)); } -- cgit