summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/botserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-07 00:24:37 -0400
committerAdam <Adam@anope.org>2013-05-07 00:24:37 -0400
commit6859decfb8ed0430e946ff81eca4f9da879f69c9 (patch)
tree91313f0aeff3676ad3f88dc5aa37b9caa3352f9b /modules/pseudoclients/botserv.cpp
parente23baf4297c662e2e6585b29e2bbed0183e68642 (diff)
Fix setting some default flags, reading fantasy blocks, and minusers setting being off by 1
Diffstat (limited to 'modules/pseudoclients/botserv.cpp')
-rw-r--r--modules/pseudoclients/botserv.cpp5
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