From 4c2a4929ea32dcd80dd4ac93ec6f329194bbf672 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 19 Sep 2011 12:36:52 -0400 Subject: [PATCH] Call fantasy events even if the commands for them don't exist --- modules/pseudoclients/botserv.cpp | 16 +++++++++------- 1 file 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)); } } }