summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-19 01:11:55 -0400
committerAdam <Adam@anope.org>2013-05-19 01:11:55 -0400
commit7aa02864d21d75088149abd7b349ac2074471151 (patch)
treea766420d8ce53a52795046a60334f067deaf44dc
parent2a8202c83251f495191c95ba26428d9e545e252e (diff)
Mark service:channels as a "botchannel" and don't try to hold them on sync, as the client should always be in the channel
-rw-r--r--modules/pseudoclients/chanserv.cpp2
-rw-r--r--src/config.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp
index db5e16146..7b0234d2e 100644
--- a/modules/pseudoclients/chanserv.cpp
+++ b/modules/pseudoclients/chanserv.cpp
@@ -352,7 +352,7 @@ class ChanServCore : public Module
void OnChannelSync(Channel *c) anope_override
{
bool perm = c->HasMode("PERM") || (c->ci && c->ci->HasExt("PERSIST"));
- if (!perm && (c->users.empty() || (c->users.size() == 1 && c->users.begin()->second->user->server == Me)))
+ if (!perm && !c->HasExt("BOTCHANNEL") && (c->users.empty() || (c->users.size() == 1 && c->users.begin()->second->user->server == Me)))
{
chanserv.Hold(c);
}
diff --git a/src/config.cpp b/src/config.cpp
index f96027453..7d96fdbed 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -338,6 +338,8 @@ Conf::Conf() : Block("")
if (!c)
continue; // Can't happen
+ c->Extend("BOTCHANNEL");
+
/* Remove all existing modes */
ChanUserContainer *cu = c->FindUser(bi);
if (cu != NULL)
@@ -373,7 +375,10 @@ Conf::Conf() : Block("")
Channel *c = Channel::Find(chname);
if (c)
+ {
+ c->Shrink("BOTCHANNEL");
bi->Part(c);
+ }
}
}