diff options
Diffstat (limited to 'modules/pseudoclients')
| -rw-r--r-- | modules/pseudoclients/chanserv.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index b5deaf284..f1ad3ec6a 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -65,7 +65,7 @@ class ChanServCore : public Module if (ChanServ == NULL) throw ModuleException("No bot named " + Config->ChanServ); - Implementation i[] = { I_OnBotPrivmsg, I_OnDelCore, I_OnPreHelp, I_OnPostHelp }; + Implementation i[] = { I_OnBotPrivmsg, I_OnDelCore, I_OnPreHelp, I_OnPostHelp, I_OnCheckModes }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } @@ -179,6 +179,17 @@ class ChanServCore : public Module "any channel, view (and modify) the access, levels and akick\n" "lists and settings for any channel.")); } + + EventReturn OnCheckModes(Channel *c) anope_override + { + if (!Config->CSRequire.empty()) + if (c->ci) + c->SetModes(NULL, false, "+%s", Config->CSRequire.c_str()); + else + c->SetModes(NULL, false, "-%s", Config->CSRequire.c_str()); + + return EVENT_CONTINUE; + } }; MODULE_INIT(ChanServCore) |
