1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 04:26:38 +02:00

Call fantasy events even if the commands for them don't exist

This commit is contained in:
Adam
2011-09-19 12:36:52 -04:00
parent be77a7e27e
commit 4c2a4929ea
+9 -7
View File
@@ -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));
}
}
}