From 0c469abe4a4b69fd5de314428a82a7f400e5862e Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 12 Oct 2017 19:35:29 -0400 Subject: [PATCH] Call OnDelChan prior to unsetting extensibles cs_set uses this to set -P on permanent channels if they are persistent. Also move similar event in nickcore/nickalias destruction --- src/nickalias.cpp | 4 ++-- src/nickcore.cpp | 4 ++-- src/regchannel.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nickalias.cpp b/src/nickalias.cpp index 653e9461b..6e68ba4a6 100644 --- a/src/nickalias.cpp +++ b/src/nickalias.cpp @@ -50,10 +50,10 @@ NickAlias::NickAlias(const Anope::string &nickname, NickCore* nickcore) : Serial NickAlias::~NickAlias() { - UnsetExtensibles(); - FOREACH_MOD(OnDelNick, (this)); + UnsetExtensibles(); + /* Accept nicks that have no core, because of database load functions */ if (this->nc) { diff --git a/src/nickcore.cpp b/src/nickcore.cpp index cede8b6e4..e35ef8010 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -37,10 +37,10 @@ NickCore::NickCore(const Anope::string &coredisplay) : Serializable("NickCore"), NickCore::~NickCore() { - UnsetExtensibles(); - FOREACH_MOD(OnDelCore, (this)); + UnsetExtensibles(); + if (!this->chanaccess->empty()) Log(LOG_DEBUG) << "Non-empty chanaccess list in destructor!"; diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 9502d2116..019d84046 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -140,10 +140,10 @@ ChannelInfo::ChannelInfo(const ChannelInfo &ci) : Serializable("ChannelInfo"), ChannelInfo::~ChannelInfo() { - UnsetExtensibles(); - FOREACH_MOD(OnDelChan, (this)); + UnsetExtensibles(); + Log(LOG_DEBUG) << "Deleting channel " << this->name; if (this->c)