summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-10-12 19:35:29 -0400
committerAdam <Adam@anope.org>2017-10-12 19:37:06 -0400
commit0c469abe4a4b69fd5de314428a82a7f400e5862e (patch)
treee34fa3b3dfa6f9fc1029fb5a1b94c8a669055168
parentd63e32a579b7a19316fa209a99cba3ce79daf6ef (diff)
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
-rw-r--r--src/nickalias.cpp4
-rw-r--r--src/nickcore.cpp4
-rw-r--r--src/regchannel.cpp4
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)