diff options
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(); |