diff options
-rw-r--r-- | modules/pseudoclients/botserv.cpp | 5 | ||||
-rw-r--r-- | modules/pseudoclients/chanserv.cpp | 2 | ||||
-rw-r--r-- | modules/pseudoclients/nickserv.cpp | 2 | ||||
-rw-r--r-- | src/config.cpp | 2 |
4 files changed, 6 insertions, 5 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 diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 73980a36a..906aab6f3 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -315,7 +315,7 @@ class ChanServCore : public Module /* Set default chan flags */ for (unsigned i = 0; i < defaults.size(); ++i) - this->ExtendMetadata(defaults[i]); + ci->ExtendMetadata(defaults[i].upper()); { Anope::string modes; diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index e45ad6abf..c027563f2 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -437,7 +437,7 @@ class NickServCore : public Module { /* Set default flags */ for (unsigned i = 0; i < defaults.size(); ++i) - this->ExtendMetadata(defaults[i].upper()); + nc->ExtendMetadata(defaults[i].upper()); } void OnUserQuit(User *u, const Anope::string &msg) diff --git a/src/config.cpp b/src/config.cpp index 46ad48d43..b3eca95ff 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -452,7 +452,7 @@ Conf::Conf() : Block("") ValidateNotEmpty("fantasy", "name", nname); ValidateNotEmpty("fantasy", "command", service); - CommandInfo &c = this->Fantasy[name]; + CommandInfo &c = this->Fantasy[nname]; c.name = service; c.permission = permission; c.group = group; |