summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
+ }
}
}