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:
+2
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user