summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/commands/cs_drop.cpp4
-rw-r--r--src/regchannel.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp
index ade021dc1..433e35799 100644
--- a/modules/commands/cs_drop.cpp
+++ b/modules/commands/cs_drop.cpp
@@ -56,15 +56,13 @@ class CommandCSDrop : public Command
FOREACH_MOD(I_OnChanDrop, OnChanDrop(ci));
- Channel *c = ci->c;
+ Reference<Channel> c = ci->c;
delete ci;
source.Reply(_("Channel \002%s\002 has been dropped."), chan.c_str());
if (c)
c->CheckModes();
-
- return;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index 38246f5dd..4ed7b4d86 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -359,6 +359,8 @@ ChannelInfo::~ChannelInfo()
if (this->c)
{
+ this->Shrink("PERSIST");
+
if (this->bi && this->c->FindUser(this->bi))
this->bi->Part(this->c);