1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 18:23:13 +02:00

Fixed OSOpersOnly & CSOpersOnly

This commit is contained in:
Adam
2011-07-14 21:40:21 -04:00
parent 1a2486d2ec
commit f277be0f26
5 changed files with 29 additions and 7 deletions
+13 -2
View File
@@ -24,8 +24,19 @@ class ChanServCore : public Module
if (ChanServ == NULL)
throw ModuleException("No bot named " + Config->ChanServ);
Implementation i[] = { I_OnDelChan, I_OnPreHelp, I_OnPostHelp };
ModuleManager::Attach(i, this, 3);
Implementation i[] = { I_OnBotPrivmsg, I_OnDelChan, I_OnPreHelp, I_OnPostHelp };
ModuleManager::Attach(i, this, 4);
}
EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message)
{
if (Config->CSOpersOnly && !u->HasMode(UMODE_OPER) && bi->nick == Config->ChanServ)
{
u->SendMessage(bi, ACCESS_DENIED);
return EVENT_STOP;
}
return EVENT_CONTINUE;
}
void OnDelCore(NickCore *nc)