diff options
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) |