summaryrefslogtreecommitdiff
path: root/src/regchannel.cpp
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-24 01:19:12 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-24 01:19:12 +0000
commit24f7ffcf180a9b32a4f27068042de0c39be8ec84 (patch)
treeeab9a81f28c8f208a9ecf3a7c34cb22d3d4757a2 /src/regchannel.cpp
parentc3529b61292b4221b61dc96899aa5360975c3e98 (diff)
Remove the permanent channel mode from channels that are dropped/expired/etc
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2663 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r--src/regchannel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index 4d1e1cf7d..d70558940 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -72,6 +72,12 @@ ChannelInfo::~ChannelInfo()
FOREACH_MOD(I_OnDelChan, OnDelChan(this));
+ if (this->c && this->c->HasMode(CMODE_PERM))
+ {
+ this->c->RemoveMode(CMODE_PERM);
+ ircdproto->SendMode(whosends(this), this->name, "-%c", ModeManager::FindChannelModeByName(CMODE_PERM)->ModeChar);
+ }
+
if (debug)
alog("debug: Deleting channel %s", this->name);