From df321a118e7dd44dcd3a389f8ee75e9ff915b55e Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 14 May 2014 19:10:23 -0400 Subject: Fix access lists showing the wrong mask if the display nick for a group expires but the group still exists. This can cause access entries for nicks to not be deleted whenever the nicks are deleted. --- modules/pseudoclients/chanserv.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/pseudoclients') diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 250296f55..3640a006c 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -154,7 +154,7 @@ class ChanServCore : public Module, public ChanServService for (unsigned j = 0; j < ci->GetAccessCount(); ++j) { const ChanAccess *ca = ci->GetAccess(j); - const NickCore *anc = NickCore::Find(ca->mask); + NickCore *anc = ca->GetAccount(); if (!anc || (!anc->IsServicesOper() && max_reg && anc->channelcount >= max_reg) || (anc == nc)) continue; @@ -162,7 +162,7 @@ class ChanServCore : public Module, public ChanServService highest = ca; } if (highest) - newowner = NickCore::Find(highest->mask); + newowner = highest->GetAccount(); } if (newowner) @@ -186,9 +186,8 @@ class ChanServCore : public Module, public ChanServService for (unsigned j = 0; j < ci->GetAccessCount(); ++j) { const ChanAccess *ca = ci->GetAccess(j); - const NickCore *anc = NickCore::Find(ca->mask); - if (anc && anc == nc) + if (ca->GetAccount() == nc) { delete ci->EraseAccess(j); break; @@ -224,7 +223,7 @@ class ChanServCore : public Module, public ChanServService { ChanAccess *a = c->GetAccess(j); - if (a->mask.equals_ci(ci->name)) + if (a->Mask().equals_ci(ci->name)) { delete a; break; -- cgit