diff options
-rw-r--r-- | modules/pseudoclients/chanserv.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 0ceeded25..ee9ab59ff 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -12,6 +12,13 @@ #include "module.h" #include "modules/cs_mode.h" +inline static Anope::string BotModes() +{ + return Config->GetModule("botserv")->Get<Anope::string>("botmodes", + Config->GetModule("chanserv")->Get<Anope::string>("botmodes", "o") + ); +} + class ChanServCore : public Module, public ChanServService { Reference<BotInfo> ChanServ; @@ -395,7 +402,7 @@ class ChanServCore : public Module, public ChanServService ci->WhoSends()->Assign(NULL, ci); if (ci->c->FindUser(ci->bi) == NULL) { - ChannelStatus status(Config->GetModule("botserv")->Get<const Anope::string>("botmodes")); + ChannelStatus status(BotModes()); ci->bi->Join(ci->c, &status); } } |