summaryrefslogtreecommitdiff
path: root/src/nickcore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nickcore.cpp')
-rw-r--r--src/nickcore.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nickcore.cpp b/src/nickcore.cpp
index fc46cd6d4..84761ed79 100644
--- a/src/nickcore.cpp
+++ b/src/nickcore.cpp
@@ -62,6 +62,9 @@ NickCore::~NickCore()
/* Log .. */
Alog() << Config.s_NickServ << ": deleting nickname group " << this->display;
+ /* Clear access before deleting display name, we want to be able to use the display name in the clear access event */
+ this->ClearAccess();
+
/* Now we can safely free it. */
delete [] this->display;
@@ -72,8 +75,6 @@ NickCore::~NickCore()
if (this->url)
delete [] this->url;
- this->ClearAccess();
-
if (!this->memos.memos.empty())
{
for (unsigned i = 0; i < this->memos.memos.size(); ++i)
@@ -119,6 +120,7 @@ bool NickCore::HasPriv(const std::string &privstr) const
void NickCore::AddAccess(const std::string &entry)
{
access.push_back(entry);
+ FOREACH_MOD(I_OnNickAddAccess, OnNickAddAccess(this, entry));
}
std::string NickCore::GetAccess(unsigned entry)