diff options
author | Adam <Adam@anope.org> | 2011-09-19 12:36:52 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-09-19 12:36:52 -0400 |
commit | 4c2a4929ea32dcd80dd4ac93ec6f329194bbf672 (patch) | |
tree | 7c96d238f501a3b22066fb693bd88323b590d5c5 | |
parent | be77a7e27e5b337f294d6283ed48c734658f25a9 (diff) |
Call fantasy events even if the commands for them don't exist
-rw-r--r-- | modules/pseudoclients/botserv.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index 802e1e82e..8e9fbb7cf 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -75,6 +75,15 @@ class BotServCore : public Module rest = realbuf.substr(space + 1); } + if (c->ci->AccessFor(u).HasPriv("FANTASIA")) + { + FOREACH_MOD(I_OnBotFantasy, OnBotFantasy(command, u, c->ci, rest)); + } + else + { + FOREACH_MOD(I_OnBotNoFantasyAccess, OnBotNoFantasyAccess(command, u, c->ci, rest)); + } + BotInfo *bi = findbot(Config->ChanServ); if (bi == NULL) bi = findbot(Config->BotServ); @@ -83,16 +92,9 @@ class BotServCore : public Module if (c->ci->AccessFor(u).HasPriv("FANTASIA")) { - this->fantasy_channel = c; bi->OnMessage(u, realbuf); this->fantasy_channel = NULL; - - FOREACH_MOD(I_OnBotFantasy, OnBotFantasy(command, u, c->ci, rest)); - } - else - { - FOREACH_MOD(I_OnBotNoFantasyAccess, OnBotNoFantasyAccess(command, u, c->ci, rest)); } } } |