From 302a409136545ffb2e68cf09dc81077ed3e6dc99 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 6 Apr 2013 15:44:03 -0500 Subject: [PATCH] Unset +P from perm channels when expiring --- modules/commands/cs_set.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)