diff options
Diffstat (limited to 'modules/pseudoclients/botserv.cpp')
-rw-r--r-- | modules/pseudoclients/botserv.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<unsigned>("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<unsigned>("minusers") && !c->FindUser(c->ci->bi)) { ChannelStatus status(Config->GetModule(this)->Get<const Anope::string>("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<const Anope::string>("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 |