From 08583dc107974252312fb7c87532c9deb68e7f63 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 4 Feb 2011 15:30:31 -0500 Subject: Moved the language strings which are only used once out of the core and into the modules that use them. --- modules/core/bs_act.cpp | 15 +- modules/core/bs_assign.cpp | 22 +- modules/core/bs_badwords.cpp | 75 +++++-- modules/core/bs_bot.cpp | 94 ++++---- modules/core/bs_botlist.cpp | 21 +- modules/core/bs_help.cpp | 13 +- modules/core/bs_info.cpp | 114 +++++----- modules/core/bs_kick.cpp | 213 +++++++++++++------ modules/core/bs_say.cpp | 14 +- modules/core/bs_set.cpp | 149 +++++++++---- modules/core/bs_unassign.cpp | 22 +- modules/core/cs_access.cpp | 212 ++++++++++++------ modules/core/cs_akick.cpp | 108 +++++++--- modules/core/cs_ban.cpp | 23 +- modules/core/cs_clearusers.cpp | 17 +- modules/core/cs_clone.cpp | 27 ++- modules/core/cs_drop.cpp | 24 ++- modules/core/cs_forbid.cpp | 21 +- modules/core/cs_getkey.cpp | 14 +- modules/core/cs_help.cpp | 17 +- modules/core/cs_info.cpp | 71 ++++--- modules/core/cs_invite.cpp | 23 +- modules/core/cs_kick.cpp | 23 +- modules/core/cs_list.cpp | 43 ++-- modules/core/cs_mode.cpp | 48 +++-- modules/core/cs_modes.cpp | 144 +++++++++---- modules/core/cs_register.cpp | 41 +++- modules/core/cs_saset.cpp | 22 +- modules/core/cs_saset_noexpire.cpp | 13 +- modules/core/cs_set.cpp | 24 ++- modules/core/cs_set_bantype.cpp | 28 +-- modules/core/cs_set_description.cpp | 19 +- modules/core/cs_set_founder.cpp | 27 ++- modules/core/cs_set_keeptopic.cpp | 24 +-- modules/core/cs_set_opnotice.cpp | 23 +- modules/core/cs_set_peace.cpp | 23 +- modules/core/cs_set_persist.cpp | 37 ++-- modules/core/cs_set_private.cpp | 22 +- modules/core/cs_set_restricted.cpp | 22 +- modules/core/cs_set_secure.cpp | 24 +-- modules/core/cs_set_securefounder.cpp | 26 +-- modules/core/cs_set_secureops.cpp | 22 +- modules/core/cs_set_signkick.cpp | 30 +-- modules/core/cs_set_successor.cpp | 34 +-- modules/core/cs_set_topiclock.cpp | 23 +- modules/core/cs_set_xop.cpp | 39 ++-- modules/core/cs_status.cpp | 19 +- modules/core/cs_suspend.cpp | 37 ++-- modules/core/cs_topic.cpp | 19 +- modules/core/cs_unban.cpp | 22 +- modules/core/cs_xop.cpp | 390 +++++++++++++++++++++------------- modules/core/hs_del.cpp | 14 +- modules/core/hs_delall.cpp | 14 +- modules/core/hs_group.cpp | 14 +- modules/core/hs_help.cpp | 2 +- modules/core/hs_list.cpp | 31 ++- modules/core/hs_off.cpp | 11 +- modules/core/hs_on.cpp | 13 +- modules/core/hs_set.cpp | 31 +-- modules/core/hs_setall.cpp | 32 +-- modules/core/ms_cancel.cpp | 17 +- modules/core/ms_check.cpp | 19 +- modules/core/ms_del.cpp | 39 ++-- modules/core/ms_help.cpp | 13 +- modules/core/ms_ignore.cpp | 27 +-- modules/core/ms_info.cpp | 95 +++++---- modules/core/ms_list.cpp | 39 ++-- modules/core/ms_read.cpp | 33 +-- modules/core/ms_rsend.cpp | 20 +- modules/core/ms_send.cpp | 11 +- modules/core/ms_sendall.cpp | 11 +- modules/core/ms_set.cpp | 121 +++++++---- modules/core/ms_staff.cpp | 11 +- modules/core/ns_access.cpp | 53 +++-- modules/core/ns_ajoin.cpp | 24 ++- modules/core/ns_alist.cpp | 47 +++- modules/core/ns_drop.cpp | 52 +++-- modules/core/ns_forbid.cpp | 21 +- modules/core/ns_getemail.cpp | 14 +- modules/core/ns_getpass.cpp | 23 +- modules/core/ns_ghost.cpp | 35 ++- modules/core/ns_group.cpp | 112 +++++++--- modules/core/ns_help.cpp | 24 ++- modules/core/ns_identify.cpp | 36 ++-- modules/core/ns_info.cpp | 66 +++--- modules/core/ns_list.cpp | 64 ++++-- modules/core/ns_logout.cpp | 30 ++- modules/core/ns_recover.cpp | 49 +++-- modules/core/ns_register.cpp | 124 ++++++++--- modules/core/ns_release.cpp | 34 ++- modules/core/ns_resetpass.cpp | 34 +-- modules/core/ns_saset.cpp | 55 +++-- modules/core/ns_saset_noexpire.cpp | 13 +- modules/core/ns_sendpass.cpp | 34 ++- modules/core/ns_set.cpp | 53 +++-- modules/core/ns_set_autoop.cpp | 23 +- modules/core/ns_set_email.cpp | 24 ++- modules/core/ns_set_greet.cpp | 22 +- modules/core/ns_set_hide.cpp | 50 +++-- modules/core/ns_set_kill.cpp | 48 ++++- modules/core/ns_set_language.cpp | 38 +++- modules/core/ns_set_message.cpp | 26 ++- modules/core/ns_set_private.cpp | 27 ++- modules/core/ns_set_secure.cpp | 32 ++- modules/core/ns_status.cpp | 33 ++- modules/core/ns_suspend.cpp | 34 +-- modules/core/ns_update.cpp | 9 +- modules/core/os_akill.cpp | 99 ++++++--- modules/core/os_chankill.cpp | 13 +- modules/core/os_chanlist.cpp | 23 +- modules/core/os_defcon.cpp | 51 ++--- modules/core/os_global.cpp | 9 +- modules/core/os_help.cpp | 4 +- modules/core/os_ignore.cpp | 36 +++- modules/core/os_jupe.cpp | 19 +- modules/core/os_kick.cpp | 19 +- modules/core/os_mode.cpp | 14 +- modules/core/os_modinfo.cpp | 14 +- modules/core/os_modlist.cpp | 28 +-- modules/core/os_modload.cpp | 15 +- modules/core/os_modreload.cpp | 20 +- modules/core/os_modunload.cpp | 19 +- modules/core/os_news.cpp | 139 +++++++----- modules/core/os_noop.cpp | 21 +- modules/core/os_oline.cpp | 19 +- modules/core/os_quit.cpp | 10 +- modules/core/os_reload.cpp | 10 +- modules/core/os_restart.cpp | 7 +- modules/core/os_session.cpp | 123 +++++++---- modules/core/os_set.cpp | 92 +++++--- modules/core/os_shutdown.cpp | 6 +- modules/core/os_snline.cpp | 96 ++++++--- modules/core/os_sqline.cpp | 97 ++++++--- modules/core/os_staff.cpp | 16 +- modules/core/os_stats.cpp | 145 +++++++------ modules/core/os_svsnick.cpp | 22 +- modules/core/os_szline.cpp | 92 +++++--- modules/core/os_umode.cpp | 16 +- modules/core/os_update.cpp | 10 +- modules/core/os_userlist.cpp | 24 ++- 140 files changed, 3831 insertions(+), 2055 deletions(-) (limited to 'modules/core') diff --git a/modules/core/bs_act.cpp b/modules/core/bs_act.cpp index c1710c26b..b29e99fac 100644 --- a/modules/core/bs_act.cpp +++ b/modules/core/bs_act.cpp @@ -28,19 +28,19 @@ class CommandBSAct : public Command if (!check_access(u, ci, CA_SAY)) { - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); return MOD_CONT; } if (!ci->bi) { - source.Reply(BOT_NOT_ASSIGNED); + source.Reply(LanguageString::BOT_NOT_ASSIGNED); return MOD_CONT; } if (!ci->c || !ci->c->FindUser(ci->bi)) { - source.Reply(BOT_NOT_ON_CHANNEL, ci->name.c_str()); + source.Reply(LanguageString::BOT_NOT_ON_CHANNEL, ci->name.c_str()); return MOD_CONT; } @@ -59,18 +59,21 @@ class CommandBSAct : public Command void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "ACT", BOT_ACT_SYNTAX); + SyntaxError(source, "ACT", _("ACT \037channel\037 \037text\037")); } bool OnHelp(CommandSource &source, const Anope::string &subcommand) { - source.Reply(BOT_HELP_ACT); + source.Reply(_("Syntax: \002ACT \037channel\037 \037text\037\002\n" + " \n" + "Makes the bot do the equivalent of a \"/me\" command\n" + "on the given channel using the given text.")); return true; } void OnServHelp(CommandSource &source) { - source.Reply(BOT_HELP_CMD_ACT); + source.Reply(_(" ACT Makes the bot do the equivalent of a \"/me\" command")); } }; diff --git a/modules/core/bs_assign.cpp b/modules/core/bs_assign.cpp index 38762259d..4a32c4330 100644 --- a/modules/core/bs_assign.cpp +++ b/modules/core/bs_assign.cpp @@ -29,32 +29,32 @@ class CommandBSAssign : public Command if (readonly) { - source.Reply(BOT_ASSIGN_READONLY); + source.Reply(LanguageString::BOT_ASSIGN_READONLY); return MOD_CONT; } BotInfo *bi = findbot(nick); if (!bi) { - source.Reply(BOT_DOES_NOT_EXIST, nick.c_str()); + source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str()); return MOD_CONT; } if (ci->botflags.HasFlag(BS_NOBOT) || (!check_access(u, ci, CA_ASSIGN) && !u->Account()->HasPriv("botserv/administration"))) { - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); return MOD_CONT; } if (bi->HasFlag(BI_PRIVATE) && !u->Account()->HasCommand("botserv/assign/private")) { - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); return MOD_CONT; } if (ci->bi && nick.equals_ci(ci->bi->nick)) { - source.Reply(BOT_ASSIGN_ALREADY, ci->bi->nick.c_str(), chan.c_str()); + source.Reply(_("Bot \002%s\002 is already assigned to channel \002%s\002."), ci->bi->nick.c_str(), chan.c_str()); return MOD_CONT; } @@ -62,24 +62,28 @@ class CommandBSAssign : public Command Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "for " << bi->nick; bi->Assign(u, ci); - source.Reply(BOT_ASSIGN_ASSIGNED, bi->nick.c_str(), ci->name.c_str()); + source.Reply(_("Bot \002%s\002 has been assigned to %s."), bi->nick.c_str(), ci->name.c_str()); return MOD_CONT; } bool OnHelp(CommandSource &source, const Anope::string &subcommand) { - source.Reply(BOT_HELP_ASSIGN); + source.Reply(_("Syntax: \002ASSIGN \037chan\037 \037nick\037\002\n" + " \n" + "Assigns a bot pointed out by nick to the channel chan. You\n" + "can then configure the bot for the channel so it fits\n" + "your needs.")); return true; } void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "ASSIGN", BOT_ASSIGN_SYNTAX); + SyntaxError(source, "ASSIGN", _("ASSIGN \037chan\037 \037nick\037")); } void OnServHelp(CommandSource &source) { - source.Reply(BOT_HELP_CMD_ASSIGN); + source.Reply(_(" ASSIGN Assigns a bot to a channel")); } }; diff --git a/modules/core/bs_badwords.cpp b/modules/core/bs_badwords.cpp index a9b0474c8..5c6dc3efd 100644 --- a/modules/core/bs_badwords.cpp +++ b/modules/core/bs_badwords.cpp @@ -25,7 +25,7 @@ class BadwordsListCallback : public NumberList ~BadwordsListCallback() { if (!SentHeader) - source.Reply(BOT_BADWORDS_NO_MATCH, source.ci->name.c_str()); + source.Reply(_("No matching entries on %s bad words list."), source.ci->name.c_str()); } void HandleNumber(unsigned Number) @@ -36,7 +36,8 @@ class BadwordsListCallback : public NumberList if (!SentHeader) { SentHeader = true; - source.Reply(BOT_BADWORDS_LIST_HEADER, source.ci->name.c_str()); + source.Reply(_("Bad words list for %s:\n" + " Num Word Type"), source.ci->name.c_str()); } DoList(source, Number - 1, source.ci->GetBadWord(Number - 1)); @@ -44,7 +45,7 @@ class BadwordsListCallback : public NumberList static void DoList(CommandSource &source, unsigned Number, BadWord *bw) { - source.Reply(BOT_BADWORDS_LIST_FORMAT, Number + 1, bw->word.c_str(), bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : ""))); + source.Reply(_(" %3d %-30s %s"), Number + 1, bw->word.c_str(), bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : ""))); } }; @@ -64,11 +65,11 @@ class BadwordsDelCallback : public NumberList ~BadwordsDelCallback() { if (!Deleted) - source.Reply(BOT_BADWORDS_NO_MATCH, source.ci->name.c_str()); + source.Reply(_("No matching entries on %s bad words list."), source.ci->name.c_str()); else if (Deleted == 1) - source.Reply(BOT_BADWORDS_DELETED_ONE, source.ci->name.c_str()); + source.Reply(_("Deleted 1 entry from %s bad words list."), source.ci->name.c_str()); else - source.Reply(BOT_BADWORDS_DELETED_SEVERAL, Deleted, source.ci->name.c_str()); + source.Reply(_("Deleted %d entries from %s bad words list."), Deleted, source.ci->name.c_str()); } void HandleNumber(unsigned Number) @@ -92,7 +93,7 @@ class CommandBSBadwords : public Command Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, this, ci) << "LIST"; if (!ci->GetBadWordCount()) - source.Reply(BOT_BADWORDS_LIST_EMPTY, ci->name.c_str()); + source.Reply(_("%s bad words list is empty."), ci->name.c_str()); else if (!word.empty() && word.find_first_not_of("1234567890,-") == Anope::string::npos) { BadwordsListCallback list(source, word); @@ -112,14 +113,16 @@ class CommandBSBadwords : public Command if (!SentHeader) { SentHeader = true; - source.Reply(BOT_BADWORDS_LIST_HEADER, ci->name.c_str()); + source.Reply(_("Bad words list for %s:\n" + " Num Word Type"), ci->name.c_str()); + } BadwordsListCallback::DoList(source, i, bw); } if (!SentHeader) - source.Reply(BOT_BADWORDS_NO_MATCH, ci->name.c_str()); + source.Reply(_("No matching entries on %s bad words list."), ci->name.c_str()); } return MOD_CONT; @@ -149,7 +152,7 @@ class CommandBSBadwords : public Command if (ci->GetBadWordCount() >= Config->BSBadWordsMax) { - source.Reply(BOT_BADWORDS_REACHED_LIMIT, Config->BSBadWordsMax); + source.Reply(_("Sorry, you can only have %d bad words entries on a channel."), Config->BSBadWordsMax); return MOD_CONT; } @@ -159,7 +162,7 @@ class CommandBSBadwords : public Command if (!bw->word.empty() && ((Config->BSCaseSensitive && realword.equals_cs(bw->word)) || (!Config->BSCaseSensitive && realword.equals_ci(bw->word)))) { - source.Reply(BOT_BADWORDS_ALREADY_EXISTS, bw->word.c_str(), ci->name.c_str()); + source.Reply(_("\002%s\002 already exists in %s bad words list."), bw->word.c_str(), ci->name.c_str()); return MOD_CONT; } } @@ -168,7 +171,7 @@ class CommandBSBadwords : public Command Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, this, ci) << "ADD " << realword; ci->AddBadWord(realword, type); - source.Reply(BOT_BADWORDS_ADDED, realword.c_str(), ci->name.c_str()); + source.Reply(_("\002%s\002 added to %s bad words list."), realword.c_str(), ci->name.c_str()); return MOD_CONT; } @@ -197,7 +200,7 @@ class CommandBSBadwords : public Command if (i == end) { - source.Reply(BOT_BADWORDS_NOT_FOUND, word.c_str(), ci->name.c_str()); + source.Reply(_("\002%s\002 not found on %s bad words list."), word.c_str(), ci->name.c_str()); return MOD_CONT; } @@ -205,7 +208,7 @@ class CommandBSBadwords : public Command Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, this, ci) << "DEL " << badword->word; ci->EraseBadWord(i); - source.Reply(BOT_BADWORDS_DELETED, badword->word.c_str(), ci->name.c_str()); + source.Reply(_("\002%s\002 deleted from %s bad words list."), badword->word.c_str(), ci->name.c_str()); } return MOD_CONT; @@ -218,7 +221,7 @@ class CommandBSBadwords : public Command Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, this, ci) << "CLEAR"; ci->ClearBadWords(); - source.Reply(BOT_BADWORDS_CLEAR); + source.Reply(_("Bad words list is now empty.")); return MOD_CONT; } public: @@ -242,13 +245,13 @@ class CommandBSBadwords : public Command if (!check_access(u, ci, CA_BADWORDS) && (!need_args || !u->Account()->HasPriv("botserv/administration"))) { - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); return MOD_CONT; } if (readonly) { - source.Reply(BOT_BADWORDS_DISABLED); + source.Reply(_("Sorry, channel bad words list modification is temporarily disabled.")); return MOD_CONT; } @@ -268,18 +271,50 @@ class CommandBSBadwords : public Command bool OnHelp(CommandSource &source, const Anope::string &subcommand) { - source.Reply(BOT_HELP_BADWORDS); + source.Reply(_("Syntax: \002BADWORDS \037channel\037 ADD \037word\037 [\037SINGLE\037 | \037START\037 | \037END\037]\002\n" + " \002BADWORDS \037channel\037 DEL {\037word\037 | \037entry-num\037 | \037list\037}\002\n" + " \002BADWORDS \037channel\037 LIST [\037mask\037 | \037list\037]\002\n" + " \002BADWORDS \037channel\037 CLEAR\002\n" + " \n" + "Maintains the \002bad words list\002 for a channel. The bad\n" + "words list determines which words are to be kicked\n" + "when the bad words kicker is enabled. For more information,\n" + "type \002%R%S HELP KICK BADWORDS\002.\n" + " \n" + "The \002BADWORDS ADD\002 command adds the given word to the\n" + "badword list. If SINGLE is specified, a kick will be\n" + "done only if a user says the entire word. If START is \n" + "specified, a kick will be done if a user says a word\n" + "that starts with \037word\037. If END is specified, a kick\n" + "will be done if a user says a word that ends with\n" + "\037word\037. If you don't specify anything, a kick will\n" + "be issued every time \037word\037 is said by a user.\n" + " \n" + "The \002BADWORDS DEL\002 command removes the given word from the\n" + "bad words list. If a list of entry numbers is given, those\n" + "entries are deleted. (See the example for LIST below.)\n" + " \n" + "The \002BADWORDS LIST\002 command displays the bad words list. If\n" + "a wildcard mask is given, only those entries matching the\n" + "mask are displayed. If a list of entry numbers is given,\n" + "only those entries are shown; for example:\n" + " \002BADWORDS #channel LIST 2-5,7-9\002\n" + " Lists bad words entries numbered 2 through 5 and\n" + " 7 through 9.\n" + " \n" + "The \002BADWORDS CLEAR\002 command clears all entries of the\n" + "bad words list.")); return true; } void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "BADWORDS", BOT_BADWORDS_SYNTAX); + SyntaxError(source, "BADWORDS", _("BADWORDS \037channel\037 {ADD|DEL|LIST|CLEAR} [\037word\037 | \037entry-list\037] [SINGLE|START|END]")); } void OnServHelp(CommandSource &source) { - source.Reply(BOT_HELP_CMD_BADWORDS); + source.Reply(_(" BADWORDS Maintains bad words list")); } }; diff --git a/modules/core/bs_bot.cpp b/modules/core/bs_bot.cpp index 47db2c4ed..a2fa32f0b 100644 --- a/modules/core/bs_bot.cpp +++ b/modules/core/bs_bot.cpp @@ -26,60 +26,60 @@ class CommandBSBot : public Command if (findbot(nick)) { - source.Reply(BOT_BOT_ALREADY_EXISTS, nick.c_str()); + source.Reply(_("Bot \002%s\002 already exists."), nick.c_str()); return MOD_CONT; } if (nick.length() > Config->NickLen) { - source.Reply(BOT_BAD_NICK); + source.Reply(_("Bot Nicks may only contain valid nick characters.")); return MOD_CONT; } if (user.length() > Config->UserLen) { - source.Reply(BOT_LONG_IDENT, Config->UserLen); + source.Reply(_("Bot Idents may only contain %d characters."), Config->UserLen); return MOD_CONT; } if (host.length() > Config->HostLen) { - source.Reply(BOT_LONG_HOST, Config->HostLen); + source.Reply(_("Bot Hosts may only contain %d characters."), Config->HostLen); return MOD_CONT; } /* Check the nick is valid re RFC 2812 */ if (isdigit(nick[0]) || nick[0] == '-') { - source.Reply(BOT_BAD_NICK); + source.Reply(_("Bot Nicks may only contain valid nick characters.")); return MOD_CONT; } for (unsigned i = 0, end = nick.length(); i < end && i < Config->NickLen; ++i) if (!isvalidnick(nick[i])) { - source.Reply(BOT_BAD_NICK); + source.Reply(_("Bot Nicks may only contain valid nick characters.")); return MOD_CONT; } /* check for hardcored ircd forbidden nicks */ if (!ircdproto->IsNickValid(nick)) { - source.Reply(BOT_BAD_NICK); + source.Reply(_("Bot Nicks may only contain valid nick characters.")); return MOD_CONT; } /* Check the host is valid re RFC 2812 */ if (!isValidHost(host, 3)) { - source.Reply(BOT_BAD_HOST); + source.Reply(_("Bot Hosts may only contain valid host characters.")); return MOD_CONT; } for (unsigned i = 0, end = user.length(); i < end && i < Config->UserLen; ++i) if (!isalnum(user[i])) { - source.Reply(BOT_BAD_IDENT, Config->UserLen); + source.Reply(_("Bot Idents may only contain valid characters."), Config->UserLen); return MOD_CONT; } @@ -89,20 +89,20 @@ class CommandBSBot : public Command */ if (findnick(nick)) { - source.Reply(NICK_ALREADY_REGISTERED, nick.c_str()); + source.Reply(LanguageString::NICK_ALREADY_REGISTERED, nick.c_str()); return MOD_CONT; } if (!(bi = new BotInfo(nick, user, host, real))) { // XXX this cant happen? - source.Reply(BOT_BOT_CREATION_FAILED); + source.Reply(_("Sorry, bot creation failed.")); return MOD_CONT; } Log(LOG_ADMIN, source.u, this) << "ADD " << bi->GetMask() << " " << bi->realname; - source.Reply(BOT_BOT_ADDED, bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str()); + source.Reply(_("%s!%s@%s (%s) added to the bot list."), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str()); FOREACH_MOD(I_OnBotCreate, OnBotCreate(bi)); return MOD_CONT; @@ -125,37 +125,37 @@ class CommandBSBot : public Command if (!(bi = findbot(oldnick))) { - source.Reply(BOT_DOES_NOT_EXIST, oldnick.c_str()); + source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str()); return MOD_CONT; } if (!oldnick.equals_ci(nick) && nickIsServices(oldnick, false)) { - source.Reply(BOT_DOES_NOT_EXIST, oldnick.c_str()); + source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str()); return MOD_CONT; } if (nick.length() > Config->NickLen) { - source.Reply(BOT_BAD_NICK); + source.Reply(_("Bot Nicks may only contain valid nick characters.")); return MOD_CONT; } if (!user.empty() && user.length() > Config->UserLen) { - source.Reply(BOT_LONG_IDENT, Config->UserLen); + source.Reply(_("Bot Idents may only contain %d characters."), Config->UserLen); return MOD_CONT; } if (!host.empty() && host.length() > Config->HostLen) { - source.Reply(BOT_LONG_HOST, Config->HostLen); + source.Reply(_("Bot Hosts may only contain %d characters."), Config->HostLen); return MOD_CONT; } if (!oldnick.equals_ci(nick) && nickIsServices(nick, false)) { - source.Reply(BOT_DOES_NOT_EXIST, oldnick.c_str()); + source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str()); return MOD_CONT; } @@ -166,34 +166,34 @@ class CommandBSBot : public Command */ if (nick.equals_cs(bi->nick) && (!user.empty() ? user.equals_cs(bi->GetIdent()) : 1) && (!host.empty() ? host.equals_cs(bi->host) : 1) && (!real.empty() ? real.equals_cs(bi->realname) : 1)) { - source.Reply(BOT_BOT_ANY_CHANGES); + source.Reply(_("Old info is equal to the new one.")); return MOD_CONT; } /* Check the nick is valid re RFC 2812 */ if (isdigit(nick[0]) || nick[0] == '-') { - source.Reply(BOT_BAD_NICK); + source.Reply(_("Bot Nicks may only contain valid nick characters.")); return MOD_CONT; } for (unsigned i = 0, end = nick.length(); i < end && i < Config->NickLen; ++i) if (!isvalidnick(nick[i])) { - source.Reply(BOT_BAD_NICK); + source.Reply(_("Bot Nicks may only contain valid nick characters.")); return MOD_CONT; } /* check for hardcored ircd forbidden nicks */ if (!ircdproto->IsNickValid(nick)) { - source.Reply(BOT_BAD_NICK); + source.Reply(_("Bot Nicks may only contain valid nick characters.")); return MOD_CONT; } if (!host.empty() && !isValidHost(host, 3)) { - source.Reply(BOT_BAD_HOST); + source.Reply(_("Bot Hosts may only contain valid host characters.")); return MOD_CONT; } @@ -201,13 +201,13 @@ class CommandBSBot : public Command for (unsigned i = 0, end = user.length(); i < end && i < Config->UserLen; ++i) if (!isalnum(user[i])) { - source.Reply(BOT_BAD_IDENT, Config->UserLen); + source.Reply(_("Bot Idents may only contain valid characters."), Config->UserLen); return MOD_CONT; } if (!nick.equals_ci(bi->nick) && findbot(nick)) { - source.Reply(BOT_BOT_ALREADY_EXISTS, nick.c_str()); + source.Reply(_("Bot \002%s\002 already exists."), nick.c_str()); return MOD_CONT; } @@ -219,7 +219,7 @@ class CommandBSBot : public Command */ if (findnick(nick)) { - source.Reply(NICK_ALREADY_REGISTERED, nick.c_str()); + source.Reply(LanguageString::NICK_ALREADY_REGISTERED, nick.c_str()); return MOD_CONT; } @@ -262,7 +262,7 @@ class CommandBSBot : public Command bi->RejoinAll(); } - source.Reply(BOT_BOT_CHANGED, oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str()); + source.Reply(_("Bot \002%s\002 has been changed to %s!%s@%s (%s)"), oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str()); Log(LOG_ADMIN, source.u, this) << "CHANGE " << oldnick << " to " << bi->GetMask() << " " << bi->realname; FOREACH_MOD(I_OnBotChange, OnBotChange(bi)); @@ -282,13 +282,13 @@ class CommandBSBot : public Command if (!(bi = findbot(nick))) { - source.Reply(BOT_DOES_NOT_EXIST, nick.c_str()); + source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str()); return MOD_CONT; } if (nickIsServices(nick, false)) { - source.Reply(BOT_DOES_NOT_EXIST, nick.c_str()); + source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str()); return MOD_CONT; } @@ -296,7 +296,7 @@ class CommandBSBot : public Command Log(LOG_ADMIN, source.u, this) << "DEL " << bi->nick; - source.Reply(BOT_BOT_DELETED, nick.c_str()); + source.Reply(_("Bot \002%s\002 has been deleted."), nick.c_str()); delete bi; return MOD_CONT; } @@ -313,7 +313,7 @@ class CommandBSBot : public Command if (readonly) { - source.Reply(BOT_BOT_READONLY); + source.Reply(_("Sorry, bot modification is temporarily disabled.")); return MOD_CONT; } @@ -322,7 +322,7 @@ class CommandBSBot : public Command // ADD nick user host real - 5 if (!u->Account()->HasCommand("botserv/bot/add")) { - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); return MOD_CONT; } @@ -345,7 +345,7 @@ class CommandBSBot : public Command // but only oldn and newn are required if (!u->Account()->HasCommand("botserv/bot/change")) { - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); return MOD_CONT; } @@ -362,7 +362,7 @@ class CommandBSBot : public Command // DEL nick if (!u->Account()->HasCommand("botserv/bot/del")) { - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); return MOD_CONT; } @@ -382,18 +382,38 @@ class CommandBSBot : public Command bool OnHelp(CommandSource &source, const Anope::string &subcommand) { - source.Reply(BOT_SERVADMIN_HELP_BOT); + source.Reply(_("Syntax: \002BOT ADD \037nick\037 \037user\037 \037host\037 \037real\037\002\n" + " \002BOT CHANGE \037oldnick\037 \037newnick\037 [\037user\037 [\037host\037 [\037real\037]]]\002\n" + " \002BOT DEL \037nick\037\002\n" + " \n" + "Allows Services Operators to create, modify, and delete\n" + "bots that users will be able to use on their own\n" + "channels.\n" + " \n" + "\002BOT ADD\002 adds a bot with the given nickname, username,\n" + "hostname and realname. Since no integrity checks are done \n" + "for these settings, be really careful.\n" + "\002BOT CHANGE\002 allows to change nickname, username, hostname\n" + "or realname of a bot without actually delete it (and all\n" + "the data associated with it).\n" + "\002BOT DEL\002 removes the given bot from the bot list. \n" + " \n" + "\002Note\002: you cannot create a bot that has a nick that is\n" + "currently registered. If an unregistered user is currently\n" + "using the nick, they will be killed.")); return true; } void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "BOT", BOT_BOT_SYNTAX); + SyntaxError(source, "BOT", _("BOT ADD \037nick\037 \037user\037 \037host\037 \037real\037\n" + "\002BOT CHANGE \037oldnick\037 \037newnick\037 [\037user\037 [\037host\037 [\037real\037]]]\002\n" + "\002BOT DEL \037nick\037\002")); } void OnServHelp(CommandSource &source) { - source.Reply(BOT_HELP_CMD_BOT); + source.Reply(_(" BOT Maintains network bot list")); } }; diff --git a/modules/core/bs_botlist.cpp b/modules/core/bs_botlist.cpp index 37901a4a0..5166e4365 100644 --- a/modules/core/bs_botlist.cpp +++ b/modules/core/bs_botlist.cpp @@ -25,12 +25,6 @@ class CommandBSBotList : public Command User *u = source.u; unsigned count = 0; - if (BotListByNick.empty()) - { - source.Reply(BOT_BOTLIST_EMPTY); - return MOD_CONT; - } - for (patricia_tree::iterator it(BotListByNick); it.next();) { BotInfo *bi = *it; @@ -38,7 +32,7 @@ class CommandBSBotList : public Command if (!bi->HasFlag(BI_PRIVATE)) { if (!count) - source.Reply(BOT_BOTLIST_HEADER); + source.Reply(_("Bot list:")); ++count; source.Reply(" %-15s (%s@%s)", bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str()); } @@ -46,7 +40,7 @@ class CommandBSBotList : public Command if (u->Account()->HasCommand("botserv/botlist") && count < BotListByNick.size()) { - source.Reply(BOT_BOTLIST_PRIVATE_HEADER); + source.Reply(_("Bots reserved to IRC operators:")); for (patricia_tree::iterator it(BotListByNick); it.next();) { @@ -61,22 +55,25 @@ class CommandBSBotList : public Command } if (!count) - source.Reply(BOT_BOTLIST_EMPTY); + source.Reply(_("There are no bots available at this time.\n" + "Ask a Services Operator to create one!")); else - source.Reply(BOT_BOTLIST_FOOTER, count); + source.Reply(_("%d bots available."), count); return MOD_CONT; } bool OnHelp(CommandSource &source, const Anope::string &subcommand) { - source.Reply(BOT_HELP_BOTLIST); + source.Reply(_("Syntax: \002BOTLIST\002\n" + " \n" + "Lists all available bots on this network.")); return true; } void OnServHelp(CommandSource &source) { - source.Reply(BOT_HELP_CMD_BOTLIST); + source.Reply(_(" BOTLIST Lists available bots")); } }; diff --git a/modules/core/bs_help.cpp b/modules/core/bs_help.cpp index 9c2998342..ff669e82a 100644 --- a/modules/core/bs_help.cpp +++ b/modules/core/bs_help.cpp @@ -32,11 +32,20 @@ class CommandBSHelp : public Command { // Abuse syntax error to display general list help. User *u = source.u; - source.Reply(BOT_HELP); + source.Reply(_("\002%S\002 allows you to have a bot on your own channel.\n" + "It has been created for users that can't host or\n" + "configure a bot, or for use on networks that don't\n" + "allow user bots. Available commands are listed \n" + "below; to use them, type \002%R%S \037command\037\002. For \n" + "more information on a specific command, type \002%R\n" + "%S HELP \037command\037\002.")); for (CommandMap::const_iterator it = BotServ->Commands.begin(), it_end = BotServ->Commands.end(); it != it_end; ++it) if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission))) it->second->OnServHelp(source); - source.Reply(BOT_HELP_FOOTER, Config->BSMinUsers, Config->s_ChanServ.c_str(), Config->BSFantasyCharacter[0]); + source.Reply(_("Bot will join a channel whenever there is at least\n" + "\002%d\002 user(s) on it. Additionally, all %s commands\n" + "can be used if fantasy is enabled by prefixing the command\n" + "name with a %c."), Config->BSMinUsers, Config->s_ChanServ.c_str(), Config->BSFantasyCharacter[0]); } }; diff --git a/modules/core/bs_info.cpp b/modules/core/bs_info.cpp index f9dc499ed..123083f41 100644 --- a/modules/core/bs_info.cpp +++ b/modules/core/bs_info.cpp @@ -57,12 +57,12 @@ class CommandBSInfo : public Command ChannelInfo *ci; if (bi) { - source.Reply(BOT_INFO_BOT_HEADER, bi->nick.c_str()); - source.Reply(BOT_INFO_BOT_MASK, bi->GetIdent().c_str(), bi->host.c_str()); - source.Reply(BOT_INFO_BOT_REALNAME, bi->realname.c_str()); - source.Reply(BOT_INFO_BOT_CREATED, do_strftime(bi->created).c_str()); - source.Reply(BOT_INFO_BOT_OPTIONS, GetString(u, (bi->HasFlag(BI_PRIVATE) ? NICK_INFO_OPT_PRIVATE : NICK_INFO_OPT_NONE)).c_str()); - source.Reply(BOT_INFO_BOT_USAGE, bi->chancount); + source.Reply(_("Information for bot \002%s\002:"), bi->nick.c_str()); + source.Reply(_(" Mask : %s@%s"), bi->GetIdent().c_str(), bi->host.c_str()); + source.Reply(_(" Real name : %s"), bi->realname.c_str()); + source.Reply(_(" Created : %s"), do_strftime(bi->created).c_str()); + source.Reply(_(" Options : %s"), bi->HasFlag(BI_PRIVATE) ? _("Private") : _("None")); + source.Reply(_(" Used on : %d channel(s)"), bi->chancount); if (u->Account()->HasPriv("botserv/administration")) this->send_bot_channels(source, bi); @@ -71,167 +71,173 @@ class CommandBSInfo : public Command { if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("botserv/administration")) { - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); return MOD_CONT; } - source.Reply(CHAN_INFO_HEADER, ci->name.c_str()); + source.Reply(LanguageString::CHAN_INFO_HEADER, ci->name.c_str()); if (ci->bi) - source.Reply(BOT_INFO_CHAN_BOT, ci->bi->nick.c_str()); + source.Reply(_(" Bot nick : %s"), ci->bi->nick.c_str()); else - source.Reply(BOT_INFO_CHAN_BOT_NONE); + source.Reply(_(" Bot nick : not assigned yet.")); if (ci->botflags.HasFlag(BS_KICK_BADWORDS)) { if (ci->ttb[TTB_BADWORDS]) - source.Reply(BOT_INFO_CHAN_KICK_BADWORDS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_BADWORDS]); + source.Reply(_(" Bad words kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_BADWORDS]); else - source.Reply(BOT_INFO_CHAN_KICK_BADWORDS, GetString(u, BOT_INFO_ACTIVE).c_str()); + source.Reply(_(" Bad words kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); } else - source.Reply(BOT_INFO_CHAN_KICK_BADWORDS, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" Bad words kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_KICK_BOLDS)) { if (ci->ttb[TTB_BOLDS]) - source.Reply(BOT_INFO_CHAN_KICK_BOLDS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_BOLDS]); + source.Reply(_(" Bolds kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_BOLDS]); else - source.Reply(BOT_INFO_CHAN_KICK_BOLDS, GetString(u, BOT_INFO_ACTIVE).c_str()); + source.Reply(_(" Bolds kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); } else - source.Reply(BOT_INFO_CHAN_KICK_BOLDS, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" Bolds kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_KICK_CAPS)) { if (ci->ttb[TTB_CAPS]) - source.Reply(BOT_INFO_CHAN_KICK_CAPS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent); + source.Reply(_(" Caps kicker : %s (%d kick(s) to ban; minimum %d/%d%%)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent); else - source.Reply(BOT_INFO_CHAN_KICK_CAPS_ON, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->capsmin, ci->capspercent); + source.Reply(_(" Caps kicker : %s (minimum %d/%d%%)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->capsmin, ci->capspercent); } else - source.Reply(BOT_INFO_CHAN_KICK_CAPS_OFF, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" Caps kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_KICK_COLORS)) { if (ci->ttb[TTB_COLORS]) - source.Reply(BOT_INFO_CHAN_KICK_COLORS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_COLORS]); + source.Reply(_(" Colors kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_COLORS]); else - source.Reply(BOT_INFO_CHAN_KICK_COLORS, GetString(u, BOT_INFO_ACTIVE).c_str()); + source.Reply(_(" Colors kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); } else - source.Reply(BOT_INFO_CHAN_KICK_COLORS, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" Colors kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_KICK_FLOOD)) { if (ci->ttb[TTB_FLOOD]) - source.Reply(BOT_INFO_CHAN_KICK_FLOOD_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs); + source.Reply(_(" Flood kicker : %s (%d kick(s) to ban; %d lines in %ds)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs); else - source.Reply(BOT_INFO_CHAN_KICK_FLOOD_ON, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->floodlines, ci->floodsecs); + source.Reply(_(" Flood kicker : %s (%d lines in %ds)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->floodlines, ci->floodsecs); } else - source.Reply(BOT_INFO_CHAN_KICK_FLOOD_OFF, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" Flood kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_KICK_REPEAT)) { if (ci->ttb[TTB_REPEAT]) - source.Reply(BOT_INFO_CHAN_KICK_REPEAT_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_REPEAT], ci->repeattimes); + source.Reply(_(" Repeat kicker : %s (%d kick(s) to ban; %d times)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_REPEAT], ci->repeattimes); else - source.Reply(BOT_INFO_CHAN_KICK_REPEAT_ON, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->repeattimes); + source.Reply(_(" Repeat kicker : %s (%d times)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->repeattimes); } else - source.Reply(BOT_INFO_CHAN_KICK_REPEAT_OFF, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" Repeat kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_KICK_REVERSES)) { if (ci->ttb[TTB_REVERSES]) - source.Reply(BOT_INFO_CHAN_KICK_REVERSES_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_REVERSES]); + source.Reply(_(" Reverses kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_REVERSES]); else - source.Reply(BOT_INFO_CHAN_KICK_REVERSES, GetString(u, BOT_INFO_ACTIVE).c_str()); + source.Reply(_(" Reverses kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); } else - source.Reply(BOT_INFO_CHAN_KICK_REVERSES, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" Reverses kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_KICK_UNDERLINES)) { if (ci->ttb[TTB_UNDERLINES]) - source.Reply(BOT_INFO_CHAN_KICK_UNDERLINES_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_UNDERLINES]); + source.Reply(_(" Underlines kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_UNDERLINES]); else - source.Reply(BOT_INFO_CHAN_KICK_UNDERLINES, GetString(u, BOT_INFO_ACTIVE).c_str()); + source.Reply(_(" Underlines kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); } else - source.Reply(BOT_INFO_CHAN_KICK_UNDERLINES, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" Underlines kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_KICK_ITALICS)) { if (ci->ttb[TTB_ITALICS]) - source.Reply(BOT_INFO_CHAN_KICK_ITALICS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_ITALICS]); + source.Reply(_(" Italics kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_ITALICS]); else - source.Reply(BOT_INFO_CHAN_KICK_ITALICS, GetString(u, BOT_INFO_ACTIVE).c_str()); + source.Reply(_(" Italics kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); } else - source.Reply(BOT_INFO_CHAN_KICK_ITALICS, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" Italics kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_KICK_AMSGS)) { if (ci->ttb[TTB_AMSGS]) - source.Reply(BOT_INFO_CHAN_KICK_AMSGS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_AMSGS]); + source.Reply(_(" AMSG kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_AMSGS]); else - source.Reply(BOT_INFO_CHAN_KICK_AMSGS, GetString(u, BOT_INFO_ACTIVE).c_str()); + source.Reply(_(" AMSG kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); } else - source.Reply(BOT_INFO_CHAN_KICK_AMSGS, GetString(u, BOT_INFO_INACTIVE).c_str()); + source.Reply(_(" AMSG kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); if (ci->botflags.HasFlag(BS_MSG_PRIVMSG)) - source.Reply(BOT_INFO_CHAN_MSG, "PRIVMSG"); + source.Reply(_(" Fantasy reply : %s"), "PRIVMSG"); else if (ci->botflags.HasFlag(BS_MSG_NOTICE)) - source.Reply(BOT_INFO_CHAN_MSG, "NOTICE"); + source.Reply(_(" Fantasy reply : %s"), "NOTICE"); else if (ci->botflags.HasFlag(BS_MSG_NOTICEOPS)) - source.Reply(BOT_INFO_CHAN_MSG, "NOTICEOPS"); + source.Reply(_(" Fantasy reply : %s"), "NOTICEOPS"); end = buf; *end = 0; if (ci->botflags.HasFlag(BS_DONTKICKOPS)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s", GetString(u, BOT_INFO_OPT_DONTKICKOPS).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s", GetString(u->Account(), _("Ops protection")).c_str()); need_comma = true; } if (ci->botflags.HasFlag(BS_DONTKICKVOICES)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_DONTKICKVOICES).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Voices protection")).c_str()); need_comma = true; } if (ci->botflags.HasFlag(BS_FANTASY)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_FANTASY).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Fantasy")).c_str()); need_comma = true; } if (ci->botflags.HasFlag(BS_GREET)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_GREET).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Greet")).c_str()); need_comma = true; } if (ci->botflags.HasFlag(BS_NOBOT)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_NOBOT).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("No bot")).c_str()); need_comma = true; } if (ci->botflags.HasFlag(BS_SYMBIOSIS)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_SYMBIOSIS).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Symbiosis")).c_str()); need_comma = true; } - source.Reply(BOT_INFO_CHAN_OPTIONS, *buf ? buf : GetString(u, BOT_INFO_OPT_NONE).c_str()); + source.Reply(_(" Options : %s"), *buf ? buf : GetString(u->Account(), _("None")).c_str()); } else - source.Reply(BOT_INFO_NOT_FOUND, query.c_str()); + source.Reply(_("\002%s\002 is not a valid bot or registered channel."), query.c_str()); return MOD_CONT; } bool OnHelp(CommandSource &source, const Anope::string &subcommand) { - source.Reply(BOT_HELP_INFO); + source.Reply(_("Syntax: \002INFO {\037chan\037 | \037nick\037}\002\n" + " \n" + "Allows you to see %S information about a channel or a bot.\n" + "If the parameter is a channel, then you'll get information\n" + "such as enabled kickers. If the parameter is a nick,\n" + "you'll get information about a bot, such as creation\n" + "time or number of channels it is on.")); return true; } void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "INFO", BOT_INFO_SYNTAX); + SyntaxError(source, "INFO", _("INFO {\037chan\037 | \037nick\037}")); } void OnServHelp(CommandSource &source) { - source.Reply(BOT_HELP_CMD_INFO); + source.Reply(_(" INFO Allows you to see BotServ information about a channel or a bot")); } }; diff --git a/modules/core/bs_kick.cpp b/modules/core/bs_kick.cpp index eba5de508..67bd2ca05 100644 --- a/modules/core/bs_kick.cpp +++ b/modules/core/bs_kick.cpp @@ -32,15 +32,15 @@ class CommandBSKick : public Command ChannelInfo *ci = source.ci; if (readonly) - source.Reply(BOT_KICK_DISABLED); + source.Reply(_("Sorry, kicker configuration is temporarily disabled.")); else if (chan.empty() || option.empty() || value.empty()) - SyntaxError(source, "KICK", BOT_KICK_SYNTAX); + SyntaxError(source, "KICK", _("KICK \037channel\037 \037option\037 {\037ON|\037} [\037settings\037]")); else if (!value.equals_ci("ON") && !value.equals_ci("OFF")) - SyntaxError(source, "KICK", BOT_KICK_SYNTAX); + SyntaxError(source, "KICK", _("KICK \037channel\037 \037option\037 {\037ON|\037} [\037settings\037]")); else if (!check_access(u, ci, CA_SET) && !u->Account()->HasPriv("botserv/administration")) - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); else if (!ci->bi) - source.Reply(BOT_NOT_ASSIGNED); + source.Reply(LanguageString::BOT_NOT_ASSIGNED); else { bool override = !check_access(u, ci, CA_SET); @@ -61,7 +61,7 @@ class CommandBSKick : public Command Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BADWORDS]; /* reset the value back to 0 - TSL */ ci->ttb[TTB_BADWORDS] = 0; - source.Reply(BOT_KICK_BAD_TTB, ttb.c_str()); + source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str()); return MOD_CONT; } } @@ -69,14 +69,17 @@ class CommandBSKick : public Command ci->ttb[TTB_BADWORDS] = 0; ci->botflags.SetFlag(BS_KICK_BADWORDS); if (ci->ttb[TTB_BADWORDS]) - source.Reply(BOT_KICK_BADWORDS_ON_BAN, ci->ttb[TTB_BADWORDS]); + source.Reply(_("Bot will now kick \002bad words\002, and will place a ban after \n" + "%d kicks for the same user. Use the BADWORDS command\n" + "to add or remove a bad word."), ci->ttb[TTB_BADWORDS]); else - source.Reply(BOT_KICK_BADWORDS_ON); + source.Reply(_("Bot will now kick \002bad words\002. Use the BADWORDS command\n" + "to add or remove a bad word.")); } else { ci->botflags.UnsetFlag(BS_KICK_BADWORDS); - source.Reply(BOT_KICK_BADWORDS_OFF); + source.Reply(_("Bot won't kick \002bad words\002 anymore.")); } } else if (option.equals_ci("BOLDS")) @@ -91,7 +94,7 @@ class CommandBSKick : public Command { Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BOLDS]; ci->ttb[TTB_BOLDS] = 0; - source.Reply(BOT_KICK_BAD_TTB, ttb.c_str()); + source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str()); return MOD_CONT; } } @@ -99,14 +102,14 @@ class CommandBSKick : public Command ci->ttb[TTB_BOLDS] = 0; ci->botflags.SetFlag(BS_KICK_BOLDS); if (ci->ttb[TTB_BOLDS]) - source.Reply(BOT_KICK_BOLDS_ON_BAN, ci->ttb[TTB_BOLDS]); + source.Reply(_("Bot will now kick \002bolds\002, and will place a ban after\n%d kicks to the same user."), ci->ttb[TTB_BOLDS]); else - source.Reply(BOT_KICK_BOLDS_ON); + source.Reply(_("Bot will now kick \002bolds\002.")); } else { ci->botflags.UnsetFlag(BS_KICK_BOLDS); - source.Reply(BOT_KICK_BOLDS_OFF); + source.Reply(_("Bot won't kick \002bolds\002 anymore.")); } } else if (option.equals_ci("CAPS")) @@ -124,7 +127,7 @@ class CommandBSKick : public Command { Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_CAPS]; ci->ttb[TTB_CAPS] = 0; - source.Reply(BOT_KICK_BAD_TTB, ttb.c_str()); + source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str()); return MOD_CONT; } } @@ -147,14 +150,17 @@ class CommandBSKick : public Command ci->botflags.SetFlag(BS_KICK_CAPS); if (ci->ttb[TTB_CAPS]) - source.Reply(BOT_KICK_CAPS_ON_BAN, ci->capsmin, ci->capspercent, ci->ttb[TTB_CAPS]); + source.Reply(_("Bot will now kick \002caps\002 (they must constitute at least\n" + "%d characters and %d%% of the entire message), and will \n" + "place a ban after %d kicks for the same user."), ci->capsmin, ci->capspercent, ci->ttb[TTB_CAPS]); else - source.Reply(BOT_KICK_CAPS_ON, ci->capsmin, ci->capspercent); + source.Reply(_("Bot will now kick \002caps\002 (they must constitute at least\n" + "%d characters and %d%% of the entire message)."), ci->capsmin, ci->capspercent); } else { ci->botflags.UnsetFlag(BS_KICK_CAPS); - source.Reply(BOT_KICK_CAPS_OFF); + source.Reply(_("Bot won't kick \002caps\002 anymore.")); } } else if (option.equals_ci("COLORS")) @@ -169,7 +175,7 @@ class CommandBSKick : public Command { Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_COLORS]; ci->ttb[TTB_COLORS] = 0; - source.Reply(BOT_KICK_BAD_TTB, ttb.c_str()); + source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str()); return MOD_CONT; } } @@ -177,14 +183,14 @@ class CommandBSKick : public Command ci->ttb[TTB_COLORS] = 0; ci->botflags.SetFlag(BS_KICK_COLORS); if (ci->ttb[TTB_COLORS]) - source.Reply(BOT_KICK_COLORS_ON_BAN, ci->ttb[TTB_COLORS]); + source.Reply(_("Bot will now kick \002colors\002, and will place a ban after %d\nkicks for the same user."), ci->ttb[TTB_COLORS]); else - source.Reply(BOT_KICK_COLORS_ON); + source.Reply(_("Bot will now kick \002colors\002.")); } else { ci->botflags.UnsetFlag(BS_KICK_COLORS); - source.Reply(BOT_KICK_COLORS_OFF); + source.Reply(_("Bot won't kick \002colors\002 anymore.")); } } else if (option.equals_ci("FLOOD")) @@ -202,7 +208,7 @@ class CommandBSKick : public Command { Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_FLOOD]; ci->ttb[TTB_FLOOD] = 0; - source.Reply(BOT_KICK_BAD_TTB, ttb.c_str()); + source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str()); return MOD_CONT; } } @@ -225,14 +231,14 @@ class CommandBSKick : public Command ci->botflags.SetFlag(BS_KICK_FLOOD); if (ci->ttb[TTB_FLOOD]) - source.Reply(BOT_KICK_FLOOD_ON_BAN, ci->floodlines, ci->floodsecs, ci->ttb[TTB_FLOOD]); + source.Reply(_("Bot will now kick \002flood\002 (%d lines in %d seconds and\nwill place a ban after %d kicks for the same user."), ci->floodlines, ci->floodsecs, ci->ttb[TTB_FLOOD]); else - source.Reply(BOT_KICK_FLOOD_ON, ci->floodlines, ci->floodsecs); + source.Reply(_("Bot will now kick \002flood\002 (%d lines in %d seconds)."), ci->floodlines, ci->floodsecs); } else { ci->botflags.UnsetFlag(BS_KICK_FLOOD); - source.Reply(BOT_KICK_FLOOD_OFF); + source.Reply(_("Bot won't kick \002flood\002 anymore.")); } } else if (option.equals_ci("REPEAT")) @@ -249,7 +255,7 @@ class CommandBSKick : public Command { Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REPEAT]; ci->ttb[TTB_REPEAT] = 0; - source.Reply(BOT_KICK_BAD_TTB, ttb.c_str()); + source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str()); return MOD_CONT; } } @@ -265,14 +271,17 @@ class CommandBSKick : public Command ci->botflags.SetFlag(BS_KICK_REPEAT); if (ci->ttb[TTB_REPEAT]) - source.Reply(BOT_KICK_REPEAT_ON_BAN, ci->repeattimes, ci->ttb[TTB_REPEAT]); + source.Reply(_("Bot will now kick \002repeats\002 (users that say %d times\n" + "the same thing), and will place a ban after %d \n" + "kicks for the same user."), ci->repeattimes, ci->ttb[TTB_REPEAT]); else - source.Reply(BOT_KICK_REPEAT_ON, ci->repeattimes); + source.Reply(_("Bot will now kick \002repeats\002 (users that say %d times\n" + "the same thing)."), ci->repeattimes); } else { ci->botflags.UnsetFlag(BS_KICK_REPEAT); - source.Reply(BOT_KICK_REPEAT_OFF); + source.Reply(_("Bot won't kick \002repeats\002 anymore.")); } } else if (option.equals_ci("REVERSES")) @@ -287,7 +296,7 @@ class CommandBSKick : public Command { Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REVERSES]; ci->ttb[TTB_REVERSES] = 0; - source.Reply(BOT_KICK_BAD_TTB, ttb.c_str()); + source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str()); return MOD_CONT; } } @@ -295,14 +304,14 @@ class CommandBSKick : public Command ci->ttb[TTB_REVERSES] = 0; ci->botflags.SetFlag(BS_KICK_REVERSES); if (ci->ttb[TTB_REVERSES]) - source.Reply(BOT_KICK_REVERSES_ON_BAN, ci->ttb[TTB_REVERSES]); + source.Reply(_("Bot will now kick \002reverses\002, and will place a ban after %d\nkicks for the same user."), ci->ttb[TTB_REVERSES]); else - source.Reply(BOT_KICK_REVERSES_ON); + source.Reply(_("Bot will now kick \002reverses\002.")); } else { ci->botflags.UnsetFlag(BS_KICK_REVERSES); - source.Reply(BOT_KICK_REVERSES_OFF); + source.Reply(_("Bot won't kick \002reverses\002 anymore.")); } } else if (option.equals_ci("UNDERLINES")) @@ -317,7 +326,7 @@ class CommandBSKick : public Command { Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_UNDERLINES]; ci->ttb[TTB_UNDERLINES] = 0; - source.Reply(BOT_KICK_BAD_TTB, ttb.c_str()); + source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str()); return MOD_CONT; } } @@ -325,14 +334,14 @@ class CommandBSKick : public Command ci->ttb[TTB_UNDERLINES] = 0; ci->botflags.SetFlag(BS_KICK_UNDERLINES); if (ci->ttb[TTB_UNDERLINES]) - source.Reply(BOT_KICK_UNDERLINES_ON_BAN, ci->ttb[TTB_UNDERLINES]); + source.Reply(_("Bot will now kick \002underlines\002, and will place a ban after %d\nkicks for the same user."), ci->ttb[TTB_UNDERLINES]); else - source.Reply(BOT_KICK_UNDERLINES_ON); + source.Reply(_("Bot will now kick \002underlines\002.")); } else { ci->botflags.UnsetFlag(BS_KICK_UNDERLINES); - source.Reply(BOT_KICK_UNDERLINES_OFF); + source.Reply(_("Bot won't kick \002underlines\002 anymore.")); } } else if (option.equals_ci("ITALICS")) @@ -347,7 +356,7 @@ class CommandBSKick : public Command { Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_ITALICS]; ci->ttb[TTB_ITALICS] = 0; - source.Reply(BOT_KICK_BAD_TTB, ttb.c_str()); + source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str()); return MOD_CONT; } } @@ -355,14 +364,14 @@ class CommandBSKick : public Command ci->ttb[TTB_ITALICS] = 0; ci->botflags.SetFlag(BS_KICK_ITALICS); if (ci->ttb[TTB_ITALICS]) - source.Reply(BOT_KICK_ITALICS_ON_BAN, ci->ttb[TTB_ITALICS]); + source.Reply(_("Bot will now kick \002italics\002, and will place a ban after\n%d kicks for the same user."), ci->ttb[TTB_ITALICS]); else - source.Reply(BOT_KICK_ITALICS_ON); + source.Reply(_("Bot will now kick \002italics\002.")); } else { ci->botflags.UnsetFlag(BS_KICK_ITALICS); - source.Reply(BOT_KICK_ITALICS_OFF); + source.Reply(_("Bot won't kick \002italics\002 anymore.")); } } else if (option.equals_ci("AMSGS")) @@ -377,7 +386,6 @@ class CommandBSKick : public Command { Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_ITALICS]; ci->ttb[TTB_AMSGS] = 0; - source.Reply(BOT_KICK_AMSGS_ON_BAN, ci->ttb[TTB_AMSGS]); return MOD_CONT; } } @@ -385,18 +393,18 @@ class CommandBSKick : public Command ci->ttb[TTB_AMSGS] = 0; ci->botflags.SetFlag(BS_KICK_AMSGS); if (ci->ttb[TTB_AMSGS]) - source.Reply(BOT_KICK_AMSGS_ON_BAN, ci->ttb[TTB_AMSGS]); + source.Reply(_("Bot will now kick for \002amsgs\002, and will place a ban after %d\nkicks for the same user."), ci->ttb[TTB_AMSGS]); else - source.Reply(BOT_KICK_AMSGS_ON); + source.Reply(_("Bot will now kick for \002amsgs\002")); } else { ci->botflags.UnsetFlag(BS_KICK_AMSGS); - source.Reply(BOT_KICK_AMSGS_OFF); + source.Reply(_("Bot won't kick for \002amsgs\002 anymore.")); } } else - source.Reply(BOT_KICK_UNKNOWN, option.c_str()); + source.Reply(LanguageString::UNKNOWN_OPTION, option.c_str(), this->name.c_str()); } return MOD_CONT; } @@ -404,27 +412,112 @@ class CommandBSKick : public Command bool OnHelp(CommandSource &source, const Anope::string &subcommand) { if (subcommand.empty()) - source.Reply(BOT_HELP_KICK); + source.Reply(_("Syntax: \002KICK \037channel\037 \037option\037 \037parameters\037\002\n" + " \n" + "Configures bot kickers. \037option\037 can be one of:\n" + " \n" + " AMSGS Sets if the bot kicks for amsgs\n" + " BOLDS Sets if the bot kicks bolds\n" + " BADWORDS Sets if the bot kicks bad words\n" + " CAPS Sets if the bot kicks caps\n" + " COLORS Sets if the bot kicks colors\n" + " FLOOD Sets if the bot kicks flooding users\n" + " REPEAT Sets if the bot kicks users who repeat\n" + " themselves\n" + " REVERSES Sets if the bot kicks reverses\n" + " UNDERLINES Sets if the bot kicks underlines\n" + " ITALICS Sets if the bot kicks italics\n" + " \n" + "Type \002%R%S HELP KICK \037option\037\002 for more information\n" + "on a specific option.\n" + " \n" + "Note: access to this command is controlled by the\n" + "level SET.")); else if (subcommand.equals_ci("BADWORDS")) - source.Reply(BOT_HELP_KICK_BADWORDS); + source.Reply(_("Syntax: \002KICK \037#channel\037 BADWORDS {\037ON|OFF\037} [\037ttb\037]\002\n" + "Sets the bad words kicker on or off. When enabled, this\n" + "option tells the bot to kick users who say certain words\n" + "on the channels.\n" + "You can define bad words for your channel using the\n" + "\002BADWORDS\002 command. Type \002%R%S HELP BADWORDS\002 for\n" + "more information.\n" + "ttb is the number of times a user can be kicked\n" + "before it get banned. Don't give ttb to disable\n" + "the ban system once activated.")); else if (subcommand.equals_ci("BOLDS")) - source.Reply(BOT_HELP_KICK_BOLDS); + source.Reply(_("Syntax: \002KICK \037channel\037 BOLDS {\037ON|OFF\037} [\037ttb\037]\002\n" + "Sets the bolds kicker on or off. When enabled, this\n" + "option tells the bot to kick users who use bolds.\n" + "ttb is the number of times a user can be kicked\n" + "before it get banned. Don't give ttb to disable\n" + "the ban system once activated.")); else if (subcommand.equals_ci("CAPS")) - source.Reply(BOT_HELP_KICK_CAPS); + source.Reply(_("Syntax: \002KICK \037channel\037 CAPS {\037ON|OFF\037} [\037ttb\037 [\037min\037 [\037percent\037]]]\002\n" + "Sets the caps kicker on or off. When enabled, this\n" + "option tells the bot to kick users who are talking in\n" + "CAPS.\n" + "The bot kicks only if there are at least \002min\002 caps\n" + "and they constitute at least \002percent\002%% of the total \n" + "text line (if not given, it defaults to 10 characters\n" + "and 25%%).\n" + "ttb is the number of times a user can be kicked\n" + "before it get banned. Don't give ttb to disable\n" + "the ban system once activated.")); else if (subcommand.equals_ci("COLORS")) - source.Reply(BOT_HELP_KICK_COLORS); + source.Reply(_("Syntax: \002KICK \037channel\037 COLORS {\037ON|OFF\037} [\037ttb\037]\002\n" + "Sets the colors kicker on or off. When enabled, this\n" + "option tells the bot to kick users who use colors.\n" + "ttb is the number of times a user can be kicked\n" + "before it get banned. Don't give ttb to disable\n" + "the ban system once activated.")); else if (subcommand.equals_ci("FLOOD")) - source.Reply(BOT_HELP_KICK_FLOOD); + source.Reply(_("Syntax: \002KICK \037channel\037 FLOOD {\037ON|OFF\037} [\037ttb\037 [\037ln\037 [\037secs\037]]]\002\n" + "Sets the flood kicker on or off. When enabled, this\n" + "option tells the bot to kick users who are flooding\n" + "the channel using at least \002ln\002 lines in \002secs\002 seconds\n" + "(if not given, it defaults to 6 lines in 10 seconds).\n" + " \n" + "ttb is the number of times a user can be kicked\n" + "before it get banned. Don't give ttb to disable\n" + "the ban system once activated.")); else if (subcommand.equals_ci("REPEAT")) - source.Reply(BOT_HELP_KICK_REPEAT); + source.Reply(_("Syntax: \002KICK \037#channel\037 REPEAT {\037ON|OFF\037} [\037ttb\037 [\037num\037]]\002\n" + "Sets the repeat kicker on or off. When enabled, this\n" + "option tells the bot to kick users who are repeating\n" + "themselves \002num\002 times (if num is not given, it\n" + "defaults to 3).\n" + "ttb is the number of times a user can be kicked\n" + "before it get banned. Don't give ttb to disable\n" + "the ban system once activated.")); else if (subcommand.equals_ci("REVERSES")) - source.Reply(BOT_HELP_KICK_REVERSES); + source.Reply(_("Syntax: \002KICK \037channel\037 REVERSES {\037ON|OFF\037} [\037ttb\037]\002\n" + "Sets the reverses kicker on or off. When enabled, this\n" + "option