summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp2
-rw-r--r--src/chanserv.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 24d18b102..8a500d759 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -106,7 +106,7 @@ void Channel::Reset()
void Channel::Sync()
{
- if (this->users.empty() || (this->users.size() == 1 && this->ci && this->ci->bi == this->users.front()->user))
+ if (!this->HasMode(CMODE_PERM) && (this->users.empty() || (this->users.size() == 1 && this->ci && this->ci->bi == this->users.front()->user)))
{
new ChanServTimer(this);
}
diff --git a/src/chanserv.cpp b/src/chanserv.cpp
index 338d0f311..b2dffcfd2 100644
--- a/src/chanserv.cpp
+++ b/src/chanserv.cpp
@@ -837,7 +837,7 @@ ChanServTimer::ChanServTimer(Channel *chan) : Timer(Config->CSInhabit), c(chan)
{
if (c->ci)
c->ci->SetFlag(CI_INHABIT);
- if (!c->ci->bi)
+ if (!c->ci || !c->ci->bi)
ChanServ->Join(*c);
else if (!c->FindUser(c->ci->bi))
c->ci->bi->Join(*c);