From 6859decfb8ed0430e946ff81eca4f9da879f69c9 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 7 May 2013 00:24:37 -0400 Subject: Fix setting some default flags, reading fantasy blocks, and minusers setting being off by 1 --- modules/pseudoclients/botserv.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/pseudoclients/botserv.cpp') diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index bae03eb7e..612d36c0e 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -229,7 +229,8 @@ class BotServCore : public Module * make it into the channel, leaving the channel botless even for * legit users - Rob **/ - if (c->users.size() >= Config->GetModule(this)->Get("minusers") && !c->FindUser(c->ci->bi)) + /* This is before the user has joined the channel, so check usercount + 1 */ + if (c->users.size() + 1 >= Config->GetModule(this)->Get("minusers") && !c->FindUser(c->ci->bi)) { ChannelStatus status(Config->GetModule(this)->Get("botmodes")); c->ci->bi->Join(c, &status); @@ -336,7 +337,7 @@ class BotServCore : public Module /* Set default bot flags */ spacesepstream sep(Config->GetModule(this)->Get("defaults", "greet fantasy")); for (Anope::string token; sep.GetToken(token);) - this->ExtendMetadata("BS_" + token); + ci->ExtendMetadata("BS_" + token.upper()); } void OnPreUserKicked(MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg) anope_override -- cgit