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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user