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