diff options
author | Adam <Adam@anope.org> | 2012-02-26 23:23:15 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-02-26 23:23:15 -0500 |
commit | a5b9e235ae240439608aa743c9ebb3bf6e7d342a (patch) | |
tree | 9c3040b865ace191c224a94ef525ab60581c6ba5 /modules/commands/cs_set_persist.cpp | |
parent | a78790eac4da788a8432d0b83fa72de7853dd697 (diff) |
Added chanserv:require config option to set which modes must be on all registered channels. Prevents the core from always enforcing +r on every channel, even if chanserv is not loaded.
Diffstat (limited to 'modules/commands/cs_set_persist.cpp')
-rw-r--r-- | modules/commands/cs_set_persist.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/commands/cs_set_persist.cpp b/modules/commands/cs_set_persist.cpp index 4a1d676dd..b9d4d2c35 100644 --- a/modules/commands/cs_set_persist.cpp +++ b/modules/commands/cs_set_persist.cpp @@ -172,6 +172,13 @@ class CSSetPersist : public Module { this->SetAuthor("Anope"); + ModuleManager::Attach(I_OnDelChan, this); + } + + void OnDelChan(ChannelInfo *ci) anope_override + { + if (ci->c && ci->HasFlag(CI_PERSIST)) + ci->c->RemoveMode(NULL, CMODE_PERM, "", false); } }; |