diff options
author | Adam <Adam@anope.org> | 2011-04-03 18:19:29 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-04-03 18:19:29 -0400 |
commit | 74844c0f287a875d19cc7b2fcaa13cb76a0f2061 (patch) | |
tree | 296d739713318ec815131c36d12c4ffd63fd9f0d /src/commands.cpp | |
parent | 905207093b89a3c71ee3732d051555870c4d39f5 (diff) |
Use dynamic_reference to check for users being killed from commands
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 233253319..cfff8c764 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -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(); |