diff options
-rw-r--r-- | modules/commands/bs_info.cpp | 10 | ||||
-rw-r--r-- | modules/commands/bs_kick.cpp | 5 | ||||
-rw-r--r-- | modules/commands/cs_log.cpp | 2 | ||||
-rw-r--r-- | modules/commands/cs_set.cpp | 9 | ||||
-rw-r--r-- | modules/commands/ns_set.cpp | 12 | ||||
-rw-r--r-- | modules/commands/os_forbid.cpp | 14 |
6 files changed, 31 insertions, 21 deletions
diff --git a/modules/commands/bs_info.cpp b/modules/commands/bs_info.cpp index 9cd01ebf0..f9f0dd4cc 100644 --- a/modules/commands/bs_info.cpp +++ b/modules/commands/bs_info.cpp @@ -39,8 +39,7 @@ class CommandBSInfo : public Command public: CommandBSInfo(Module *creator) : Command(creator, "botserv/info", 1, 1) { - this->SetDesc(_("Allows you to see BotServ information about a channel or a bot")); - this->SetSyntax(_("{\037chan\037|\037nick\037}")); + this->SetSyntax(_("{\037channel\037 | \037nickname\037}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override @@ -86,7 +85,7 @@ class CommandBSInfo : public Command } source.Reply(CHAN_INFO_HEADER, ci->name.c_str()); - info[_("Bot nick")] = ci->bi ? ci->bi->nick : "not assigned yet"; + info[_("Bot nick")] = ci->bi ? ci->bi->nick : _("not assigned yet"); Anope::string enabled = Language::Translate(source.nc, _("Enabled")); Anope::string disabled = Language::Translate(source.nc, _("Disabled")); @@ -114,6 +113,11 @@ class CommandBSInfo : public Command "time or number of channels it is on."), source.service->nick.c_str()); return true; } + + const Anope::string GetDesc(CommandSource &source) const anope_override + { + return Anope::printf(Language::Translate(source.GetAccount(), _("Allows you to see %s information about a channel or a bot")), source.service->nick.c_str()); + } }; class BSInfo : public Module diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index b0ff8b26e..5360746f5 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -267,13 +267,14 @@ class CommandBSKickAMSG : public CommandBSKickBase bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override { + BotInfo *bi = Config->GetClient("BotServ"); source.Reply(_("Sets the AMSG kicker on or off. When enabled, the bot will\n" "kick users who send the same message to multiple channels\n" - "where BotServ bots are.\n" + "where %s bots are.\n" " \n" "\037ttb\037 is the number of times a user can be kicked\n" "before they get banned. Don't give ttb to disable\n" - "the ban system once activated.")); + "the ban system once activated."), bi ? bi->nick.c_str() : "BotServ"); return true; } }; diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp index cca0d19de..ef8bcc521 100644 --- a/modules/commands/cs_log.cpp +++ b/modules/commands/cs_log.cpp @@ -274,7 +274,7 @@ public: " %s #anope chanserv/access MESSAGE @%\n" " Would message any channel operators whenever someone used the\n" " ACCESS command on ChanServ on the channel."), - source.command.c_str(), source.command.c_str()); + source.command.upper().c_str(), source.command.upper().c_str()); return true; } }; diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index c6160d97a..86b874d76 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -573,6 +573,8 @@ class CommandCSSetPersist : public Command bool OnHelp(CommandSource &source, const Anope::string &) anope_override { + BotInfo *BotServ = Config->GetClient("BotServ"); + BotInfo *ChanServ = Config->GetClient("ChanServ"); this->SendSyntax(source); source.Reply(" "); source.Reply(_("Enables or disables the persistent channel setting.\n" @@ -584,8 +586,8 @@ class CommandCSSetPersist : public Command "set persist on, and it can not be unassigned while persist\n" "is on.\n" " \n" - "If this network does not have BotServ enabled and does\n" - "not have a permanent channel mode, ChanServ will\n" + "If this network does not have %s enabled and does\n" + "not have a permanent channel mode, %s will\n" "join your channel when you set persist on (and leave when\n" "it has been set off).\n" " \n" @@ -593,7 +595,8 @@ class CommandCSSetPersist : public Command "and it is set or unset (for any reason, including MODE LOCK),\n" "persist is automatically set and unset for the channel aswell.\n" "Additionally, services will set or unset this mode when you\n" - "set persist on or off.")); + "set persist on or off."), BotServ ? BotServ->nick.c_str() : "BotServ", + ChanServ ? ChanServ->nick.c_str() : "ChanServ"); return true; } }; diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index e561a1524..789b0b9c1 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -261,12 +261,13 @@ class CommandNSSetAutoOp : public Command bool OnHelp(CommandSource &source, const Anope::string &) anope_override { + BotInfo *bi = Config->GetClient("ChanServ"); this->SendSyntax(source); source.Reply(" "); source.Reply(_("Sets whether you will be given your channel status modes automatically.\n" - "Set to \002ON\002 to allow ChanServ to set status modes on you automatically\n" - "when entering channels. Note that depending on channel settings some modes\n" - "may not get set automatically.")); + "Set to \002ON\002 to allow %s to set status modes on you automatically\n" + "when entering channels. Note that depending on channel settings some modes\n" + "may not get set automatically."), bi ? bi->nick.c_str() : "ChanServ"); return true; } }; @@ -287,13 +288,14 @@ class CommandNSSASetAutoOp : public CommandNSSetAutoOp bool OnHelp(CommandSource &source, const Anope::string &) anope_override { + BotInfo *bi = Config->GetClient("ChanServ"); this->SendSyntax(source); source.Reply(" "); source.Reply(_("Sets whether the given nickname will be given its status modes\n" - "in channels automatically. Set to \002ON\002 to allow ChanServ\n" + "in channels automatically. Set to \002ON\002 to allow %s\n" "to set status modes on the given nickname automatically when it\n" "is entering channels. Note that depending on channel settings\n" - "some modes may not get set automatically.")); + "some modes may not get set automatically."), bi ? bi->nick.c_str() : "ChanServ"); return true; } }; diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp index 485f66ee7..4eac5071b 100644 --- a/modules/commands/os_forbid.cpp +++ b/modules/commands/os_forbid.cpp @@ -197,7 +197,7 @@ class CommandOSForbid : public Command delete na; } - source.Reply(_("\002%d\002 nicknames dropped."), na_matches); + source.Reply(_("\002%d\002 nickname(s) dropped."), na_matches); break; } case FT_CHAN: @@ -256,7 +256,7 @@ class CommandOSForbid : public Command delete ci; } - source.Reply(_("\002%d\002 channels cleared, and \002%d\002 channels dropped."), chan_matches, ci_matches); + source.Reply(_("\002%d\002 channel(s) cleared, and \002%d\002 channel(s) dropped."), chan_matches, ci_matches); break; } @@ -394,11 +394,11 @@ class OSForbid : public Module ForbidData *d = this->forbidService.FindForbid(u->nick, FT_NICK); if (d != NULL) { - BotInfo *OperServ = Config->GetClient("OperServ"); - if (OperServ) - { - u->SendMessage(OperServ, _("This nickname has been forbidden: %s"), d->reason.c_str()); - } + BotInfo *bi = Config->GetClient("NickServ"); + if (!bi) + bi = Config->GetClient("OperServ"); + if (bi) + u->SendMessage(bi, _("This nickname has been forbidden: %s"), d->reason.c_str()); if (nickserv) nickserv->Collide(u, NULL); } |