1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 00:43:12 +02:00

Use dynamic_reference to check for users being killed from commands

This commit is contained in:
Adam
2011-04-03 18:19:29 -04:00
parent 905207093b
commit 74844c0f28
7 changed files with 8 additions and 13 deletions
+2 -1
View File
@@ -165,8 +165,9 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
return;
}
dynamic_reference<User> user_reference(u);
CommandReturn ret = c->Execute(source, params);
if (ret != MOD_STOP)
if (ret != MOD_STOP && user_reference)
{
FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, c, params));
source.DoReply();