summaryrefslogtreecommitdiff
path: root/src/chanserv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/chanserv.cpp')
-rw-r--r--src/chanserv.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chanserv.cpp b/src/chanserv.cpp
index 6a5d92ad0..e519cb8b2 100644
--- a/src/chanserv.cpp
+++ b/src/chanserv.cpp
@@ -433,7 +433,7 @@ void cs_remove_nick(NickCore *nc)
{
ChanAccess *ca = ci->GetAccess(j);
- if (!ca->nc || (!ca->nc->IsServicesOper() && Config->CSMaxReg && ca->nc->channelcount >= Config->CSMaxReg))
+ if (!ca->nc || (!ca->nc->IsServicesOper() && Config->CSMaxReg && ca->nc->channelcount >= Config->CSMaxReg) || (ca->nc == nc))
continue;
if (!highest || ca->level > highest->level)
highest = ca;
@@ -457,7 +457,7 @@ void cs_remove_nick(NickCore *nc)
{
/* Maybe move this to delchan() ? */
if (ci->c && ci->c->HasMode(CMODE_REGISTERED))
- ci->c->RemoveMode(NULL, CMODE_REGISTERED);
+ ci->c->RemoveMode(NULL, CMODE_REGISTERED, true);
}
delete ci;