From 735e234c2c7a984b01295f86045545ed8d9838ce Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 8 May 2013 20:26:45 -0400 Subject: Fixed some issues and desyncs with creating empty permanent channels on startup & dropping empty channels --- modules/pseudoclients/botserv.cpp | 4 ---- modules/pseudoclients/chanserv.cpp | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'modules/pseudoclients') diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index 612d36c0e..223a9787c 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -340,10 +340,6 @@ class BotServCore : public Module ci->ExtendMetadata("BS_" + token.upper()); } - void OnPreUserKicked(MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg) anope_override - { - } - void OnUserKicked(MessageSource &source, User *target, const Anope::string &channel, ChannelStatus &status, const Anope::string &kickmsg) anope_override { BotInfo *bi = BotInfo::Find(target->nick); diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 906aab6f3..4b652a51c 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -351,7 +351,8 @@ class ChanServCore : public Module void OnChannelSync(Channel *c) anope_override { - if (!c->HasMode("PERM") && (c->users.empty() || (c->users.size() == 1 && c->ci && c->ci->bi && *c->ci->bi == c->users.begin()->second->user))) + bool perm = c->HasMode("PERM") || (c->ci && c->ci->HasExt("PERSIST")); + if (!perm && (c->users.empty() || c->users.begin()->second->user->server == Me)) { chanserv.Hold(c); } -- cgit