diff options
author | Adam <Adam@anope.org> | 2012-12-28 15:59:33 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-12-28 15:59:33 -0500 |
commit | 6b1f323bb519009048a94c8bb3d003288a339345 (patch) | |
tree | b30ad2793adca8e63f9de0b8a45295a4f3d56dea /modules/commands/cs_suspend.cpp | |
parent | 761849083da3a523eeb3b2293311cfee1c29df35 (diff) |
Move some of CheckKick to the respective modules
Diffstat (limited to 'modules/commands/cs_suspend.cpp')
-rw-r--r-- | modules/commands/cs_suspend.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp index 4f840f576..f97f761cb 100644 --- a/modules/commands/cs_suspend.cpp +++ b/modules/commands/cs_suspend.cpp @@ -216,7 +216,7 @@ class CSSuspend : public Module { this->SetAuthor("Anope"); - Implementation i[] = { I_OnPreChanExpire }; + Implementation i[] = { I_OnPreChanExpire, I_OnCheckKick }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } @@ -250,6 +250,15 @@ class CSSuspend : public Module Log(LOG_NORMAL, "expire", ChanServ) << "Expiring suspend for " << ci->name; } } + + EventReturn OnCheckKick(User *u, ChannelInfo *ci, Anope::string &mask, Anope::string &reason) anope_override + { + if (u->HasMode(UMODE_OPER) || !ci->HasFlag(CI_SUSPENDED)) + return EVENT_CONTINUE; + + reason = Language::Translate(u, _("This channel may not be used.")); + return EVENT_STOP; + } }; MODULE_INIT(CSSuspend) |