diff options
author | Adam <Adam@anope.org> | 2013-04-06 15:44:03 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-06 15:44:03 -0500 |
commit | 302a409136545ffb2e68cf09dc81077ed3e6dc99 (patch) | |
tree | 189d544644e85b9297e85a7764c86cf10e375fd5 /modules/commands/cs_set.cpp | |
parent | 0b3b9fe128e63c836ff08c637735068564470b8e (diff) |
Unset +P from perm channels when expiring
Diffstat (limited to 'modules/commands/cs_set.cpp')
-rw-r--r-- | modules/commands/cs_set.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index f20866e2a..e3d2493ff 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -1147,7 +1147,7 @@ class CSSet : public Module { this->SetAuthor("Anope"); - Implementation i[] = { I_OnReload, I_OnChanRegistered, I_OnCheckKick }; + Implementation i[] = { I_OnReload, I_OnChanRegistered, I_OnCheckKick, I_OnDelChan }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); this->OnReload(); @@ -1175,6 +1175,12 @@ class CSSet : public Module return EVENT_CONTINUE; } + + void OnDelChan(ChannelInfo *ci) anope_override + { + if (ci->c && ci->HasExt("PERSIST")) + ci->c->RemoveMode(ci->WhoSends(), "PERM", "", false); + } }; MODULE_INIT(CSSet) |