From 24f7ffcf180a9b32a4f27068042de0c39be8ec84 Mon Sep 17 00:00:00 2001 From: Adam- Date: Tue, 24 Nov 2009 01:19:12 +0000 Subject: [PATCH] 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 --- src/regchannel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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);