From f234a2bfab8a4d900cfc0df91afed530d80738d4 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 26 Feb 2011 17:54:03 -0500 Subject: Replaced the few language strings we use with #defines to prevent accidentally translating them if we shouldnt --- modules/core/bs_act.cpp | 6 +-- modules/core/bs_assign.cpp | 8 ++-- modules/core/bs_badwords.cpp | 2 +- modules/core/bs_bot.cpp | 20 ++++----- modules/core/bs_info.cpp | 78 +++++++++++++++++------------------ modules/core/bs_kick.cpp | 6 +-- modules/core/bs_say.cpp | 6 +-- modules/core/bs_set.cpp | 8 ++-- modules/core/bs_unassign.cpp | 6 +-- modules/core/cs_access.cpp | 30 +++++++------- modules/core/cs_akick.cpp | 21 +++++----- modules/core/cs_ban.cpp | 12 +++--- modules/core/cs_clearusers.cpp | 4 +- modules/core/cs_clone.cpp | 8 ++-- modules/core/cs_drop.cpp | 6 +-- modules/core/cs_forbid.cpp | 6 +-- modules/core/cs_getkey.cpp | 2 +- modules/core/cs_info.cpp | 44 ++++++++++---------- modules/core/cs_invite.cpp | 6 +-- modules/core/cs_kick.cpp | 12 +++--- modules/core/cs_list.cpp | 8 ++-- modules/core/cs_mode.cpp | 4 +- modules/core/cs_modes.cpp | 14 +++---- modules/core/cs_register.cpp | 6 +-- modules/core/cs_saset.cpp | 8 ++-- modules/core/cs_set.cpp | 12 +++--- modules/core/cs_set_bantype.cpp | 4 +- modules/core/cs_set_description.cpp | 4 +- modules/core/cs_set_founder.cpp | 10 ++--- modules/core/cs_set_securefounder.cpp | 2 +- modules/core/cs_set_successor.cpp | 10 ++--- modules/core/cs_suspend.cpp | 6 +-- modules/core/cs_topic.cpp | 4 +- modules/core/cs_unban.cpp | 6 +-- modules/core/cs_xop.cpp | 14 +++---- modules/core/hs_del.cpp | 4 +- modules/core/hs_delall.cpp | 4 +- modules/core/hs_group.cpp | 2 +- modules/core/hs_list.cpp | 4 +- modules/core/hs_off.cpp | 2 +- modules/core/hs_on.cpp | 2 +- modules/core/hs_set.cpp | 14 +++---- modules/core/hs_setall.cpp | 14 +++---- modules/core/ms_cancel.cpp | 4 +- modules/core/ms_check.cpp | 4 +- modules/core/ms_del.cpp | 10 ++--- modules/core/ms_ignore.cpp | 6 +-- modules/core/ms_info.cpp | 10 ++--- modules/core/ms_list.cpp | 12 +++--- modules/core/ms_read.cpp | 12 +++--- modules/core/ms_rsend.cpp | 2 +- modules/core/ms_send.cpp | 2 +- modules/core/ms_sendall.cpp | 2 +- modules/core/ms_set.cpp | 12 +++--- modules/core/ms_staff.cpp | 2 +- modules/core/ns_access.cpp | 8 ++-- modules/core/ns_ajoin.cpp | 2 +- modules/core/ns_alist.cpp | 6 +-- modules/core/ns_drop.cpp | 12 +++--- modules/core/ns_forbid.cpp | 8 ++-- modules/core/ns_getpass.cpp | 6 +-- modules/core/ns_ghost.cpp | 10 ++--- modules/core/ns_group.cpp | 26 ++++++------ modules/core/ns_identify.cpp | 10 ++--- modules/core/ns_info.cpp | 12 +++--- modules/core/ns_list.cpp | 8 ++-- modules/core/ns_logout.cpp | 2 +- modules/core/ns_recover.cpp | 20 ++++----- modules/core/ns_register.cpp | 22 +++++----- modules/core/ns_release.cpp | 10 ++--- modules/core/ns_resetpass.cpp | 8 ++-- modules/core/ns_saset.cpp | 30 +++++++------- modules/core/ns_sendpass.cpp | 6 +-- modules/core/ns_set.cpp | 26 ++++++------ modules/core/ns_set_email.cpp | 4 +- modules/core/ns_suspend.cpp | 16 +++---- modules/core/os_akill.cpp | 16 +++---- modules/core/os_chankill.cpp | 4 +- modules/core/os_kick.cpp | 4 +- modules/core/os_mode.cpp | 4 +- modules/core/os_news.cpp | 6 +-- modules/core/os_oline.cpp | 2 +- modules/core/os_session.cpp | 8 ++-- modules/core/os_snline.cpp | 14 +++---- modules/core/os_sqline.cpp | 14 +++---- modules/core/os_staff.cpp | 2 +- modules/core/os_svsnick.cpp | 4 +- modules/core/os_szline.cpp | 12 +++--- modules/extra/cs_appendtopic.cpp | 4 +- modules/extra/cs_enforce.cpp | 10 ++--- modules/extra/cs_entrymsg.cpp | 4 +- modules/extra/cs_set_misc.cpp | 12 +++--- modules/extra/cs_tban.cpp | 16 +++---- modules/extra/hs_request.cpp | 27 +++++------- modules/extra/m_async_commands.cpp | 2 +- modules/extra/ns_set_misc.cpp | 13 +++--- 96 files changed, 474 insertions(+), 483 deletions(-) (limited to 'modules') diff --git a/modules/core/bs_act.cpp b/modules/core/bs_act.cpp index 0b2402f90..30021ce38 100644 --- a/modules/core/bs_act.cpp +++ b/modules/core/bs_act.cpp @@ -29,19 +29,19 @@ class CommandBSAct : public Command if (!check_access(u, ci, CA_SAY)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } if (!ci->bi) { - source.Reply(LanguageString::BOT_NOT_ASSIGNED); + source.Reply(_(BOT_NOT_ASSIGNED)); return MOD_CONT; } if (!ci->c || !ci->c->FindUser(ci->bi)) { - source.Reply(LanguageString::BOT_NOT_ON_CHANNEL, ci->name.c_str()); + source.Reply(_(BOT_NOT_ON_CHANNEL), ci->name.c_str()); return MOD_CONT; } diff --git a/modules/core/bs_assign.cpp b/modules/core/bs_assign.cpp index 65e5ff2ea..b1d967305 100644 --- a/modules/core/bs_assign.cpp +++ b/modules/core/bs_assign.cpp @@ -30,26 +30,26 @@ class CommandBSAssign : public Command if (readonly) { - source.Reply(LanguageString::BOT_ASSIGN_READONLY); + source.Reply(_(BOT_ASSIGN_READONLY)); return MOD_CONT; } BotInfo *bi = findbot(nick); if (!bi) { - source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str()); + source.Reply(_(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(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } if (bi->HasFlag(BI_PRIVATE) && !u->Account()->HasCommand("botserv/assign/private")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } diff --git a/modules/core/bs_badwords.cpp b/modules/core/bs_badwords.cpp index dd87ba41d..191ef958d 100644 --- a/modules/core/bs_badwords.cpp +++ b/modules/core/bs_badwords.cpp @@ -246,7 +246,7 @@ class CommandBSBadwords : public Command if (!check_access(u, ci, CA_BADWORDS) && (!need_args || !u->Account()->HasPriv("botserv/administration"))) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } diff --git a/modules/core/bs_bot.cpp b/modules/core/bs_bot.cpp index 60dc5afaa..0c0c0730d 100644 --- a/modules/core/bs_bot.cpp +++ b/modules/core/bs_bot.cpp @@ -89,7 +89,7 @@ class CommandBSBot : public Command */ if (findnick(nick)) { - source.Reply(LanguageString::NICK_ALREADY_REGISTERED, nick.c_str()); + source.Reply(_(NICK_ALREADY_REGISTERED), nick.c_str()); return MOD_CONT; } @@ -125,13 +125,13 @@ class CommandBSBot : public Command if (!(bi = findbot(oldnick))) { - source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str()); + source.Reply(_(BOT_DOES_NOT_EXIST), oldnick.c_str()); return MOD_CONT; } if (!oldnick.equals_ci(nick) && nickIsServices(oldnick, false)) { - source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str()); + source.Reply(_(BOT_DOES_NOT_EXIST), oldnick.c_str()); return MOD_CONT; } @@ -155,7 +155,7 @@ class CommandBSBot : public Command if (!oldnick.equals_ci(nick) && nickIsServices(nick, false)) { - source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str()); + source.Reply(_(BOT_DOES_NOT_EXIST), oldnick.c_str()); return MOD_CONT; } @@ -219,7 +219,7 @@ class CommandBSBot : public Command */ if (findnick(nick)) { - source.Reply(LanguageString::NICK_ALREADY_REGISTERED, nick.c_str()); + source.Reply(_(NICK_ALREADY_REGISTERED), nick.c_str()); return MOD_CONT; } @@ -282,13 +282,13 @@ class CommandBSBot : public Command if (!(bi = findbot(nick))) { - source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str()); + source.Reply(_(BOT_DOES_NOT_EXIST), nick.c_str()); return MOD_CONT; } if (nickIsServices(nick, false)) { - source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str()); + source.Reply(_(BOT_DOES_NOT_EXIST), nick.c_str()); return MOD_CONT; } @@ -323,7 +323,7 @@ class CommandBSBot : public Command // ADD nick user host real - 5 if (!u->Account()->HasCommand("botserv/bot/add")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -346,7 +346,7 @@ class CommandBSBot : public Command // but only oldn and newn are required if (!u->Account()->HasCommand("botserv/bot/change")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -363,7 +363,7 @@ class CommandBSBot : public Command // DEL nick if (!u->Account()->HasCommand("botserv/bot/del")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } diff --git a/modules/core/bs_info.cpp b/modules/core/bs_info.cpp index 48f09bc19..cb10631cb 100644 --- a/modules/core/bs_info.cpp +++ b/modules/core/bs_info.cpp @@ -72,11 +72,11 @@ class CommandBSInfo : public Command { if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("botserv/administration")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } - source.Reply(LanguageString::CHAN_INFO_HEADER, ci->name.c_str()); + source.Reply(_(CHAN_INFO_HEADER), ci->name.c_str()); if (ci->bi) source.Reply(_(" Bot nick : %s"), ci->bi->nick.c_str()); else @@ -85,93 +85,93 @@ class CommandBSInfo : public Command if (ci->botflags.HasFlag(BS_KICK_BADWORDS)) { if (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]); + source.Reply(_(" Bad words kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_BADWORDS]); else - source.Reply(_(" Bad words kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); + source.Reply(_(" Bad words kicker : %s"), _(ENABLED)); } else - source.Reply(_(" Bad words kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" Bad words kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_KICK_BOLDS)) { if (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]); + source.Reply(_(" Bolds kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_BOLDS]); else - source.Reply(_(" Bolds kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); + source.Reply(_(" Bolds kicker : %s"), _(ENABLED)); } else - source.Reply(_(" Bolds kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" Bolds kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_KICK_CAPS)) { if (ci->ttb[TTB_CAPS]) - 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); + source.Reply(_(" Caps kicker : %s (%d kick(s) to ban; minimum %d/%d%%)"), _(ENABLED), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent); else - source.Reply(_(" Caps kicker : %s (minimum %d/%d%%)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->capsmin, ci->capspercent); + source.Reply(_(" Caps kicker : %s (minimum %d/%d%%)"), _(ENABLED), ci->capsmin, ci->capspercent); } else - source.Reply(_(" Caps kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" Caps kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_KICK_COLORS)) { if (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]); + source.Reply(_(" Colors kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_COLORS]); else - source.Reply(_(" Colors kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); + source.Reply(_(" Colors kicker : %s"), _(ENABLED)); } else - source.Reply(_(" Colors kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" Colors kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_KICK_FLOOD)) { if (ci->ttb[TTB_FLOOD]) - 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); + source.Reply(_(" Flood kicker : %s (%d kick(s) to ban; %d lines in %ds)"), _(ENABLED), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs); else - source.Reply(_(" Flood kicker : %s (%d lines in %ds)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->floodlines, ci->floodsecs); + source.Reply(_(" Flood kicker : %s (%d lines in %ds)"), _(ENABLED), ci->floodlines, ci->floodsecs); } else - source.Reply(_(" Flood kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" Flood kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_KICK_REPEAT)) { if (ci->ttb[TTB_REPEAT]) - 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); + source.Reply(_(" Repeat kicker : %s (%d kick(s) to ban; %d times)"), _(ENABLED), ci->ttb[TTB_REPEAT], ci->repeattimes); else - source.Reply(_(" Repeat kicker : %s (%d times)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->repeattimes); + source.Reply(_(" Repeat kicker : %s (%d times)"), _(ENABLED), ci->repeattimes); } else - source.Reply(_(" Repeat kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" Repeat kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_KICK_REVERSES)) { if (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]); + source.Reply(_(" Reverses kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_REVERSES]); else - source.Reply(_(" Reverses kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); + source.Reply(_(" Reverses kicker : %s"), _(ENABLED)); } else - source.Reply(_(" Reverses kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" Reverses kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_KICK_UNDERLINES)) { if (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]); + source.Reply(_(" Underlines kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_UNDERLINES]); else - source.Reply(_(" Underlines kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); + source.Reply(_(" Underlines kicker : %s"), _(ENABLED)); } else - source.Reply(_(" Underlines kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" Underlines kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_KICK_ITALICS)) { if (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]); + source.Reply(_(" Italics kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_ITALICS]); else - source.Reply(_(" Italics kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); + source.Reply(_(" Italics kicker : %s"), _(ENABLED)); } else - source.Reply(_(" Italics kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" Italics kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_KICK_AMSGS)) { if (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]); + source.Reply(_(" AMSG kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_AMSGS]); else - source.Reply(_(" AMSG kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str()); + source.Reply(_(" AMSG kicker : %s"), _(ENABLED)); } else - source.Reply(_(" AMSG kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str()); + source.Reply(_(" AMSG kicker : %s"), _(DISABLED)); if (ci->botflags.HasFlag(BS_MSG_PRIVMSG)) source.Reply(_(" Fantasy reply : %s"), "PRIVMSG"); @@ -184,35 +184,35 @@ class CommandBSInfo : public Command *end = 0; if (ci->botflags.HasFlag(BS_DONTKICKOPS)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s", GetString(u->Account(), _("Ops protection")).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s", _("Ops protection")); need_comma = true; } if (ci->botflags.HasFlag(BS_DONTKICKVOICES)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Voices protection")).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("Voices protection")); need_comma = true; } if (ci->botflags.HasFlag(BS_FANTASY)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Fantasy")).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("Fantasy")); need_comma = true; } if (ci->botflags.HasFlag(BS_GREET)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Greet")).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("Greet")); need_comma = true; } if (ci->botflags.HasFlag(BS_NOBOT)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("No bot")).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("No bot")); need_comma = true; } if (ci->botflags.HasFlag(BS_SYMBIOSIS)) { - end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Symbiosis")).c_str()); + end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("Symbiosis")); need_comma = true; } - source.Reply(_(" Options : %s"), *buf ? buf : GetString(u->Account(), _("None")).c_str()); + source.Reply(_(" Options : %s"), *buf ? buf : _("None")); } else source.Reply(_("\002%s\002 is not a valid bot or registered channel."), query.c_str()); diff --git a/modules/core/bs_kick.cpp b/modules/core/bs_kick.cpp index 680ccc3d9..d737f5ec9 100644 --- a/modules/core/bs_kick.cpp +++ b/modules/core/bs_kick.cpp @@ -39,9 +39,9 @@ class CommandBSKick : public Command else if (!value.equals_ci("ON") && !value.equals_ci("OFF")) 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(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!ci->bi) - source.Reply(LanguageString::BOT_NOT_ASSIGNED); + source.Reply(_(BOT_NOT_ASSIGNED)); else { bool override = !check_access(u, ci, CA_SET); @@ -451,7 +451,7 @@ class CommandBSKick : public Command } } else - source.Reply(LanguageString::UNKNOWN_OPTION, option.c_str(), this->name.c_str()); + source.Reply(_(UNKNOWN_OPTION), option.c_str(), this->name.c_str()); } return MOD_CONT; } diff --git a/modules/core/bs_say.cpp b/modules/core/bs_say.cpp index 3d8f64577..8b9d0627b 100644 --- a/modules/core/bs_say.cpp +++ b/modules/core/bs_say.cpp @@ -30,19 +30,19 @@ class CommandBSSay : public Command if (!check_access(u, ci, CA_SAY)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } if (!ci->bi) { - source.Reply(LanguageString::BOT_NOT_ASSIGNED); + source.Reply(_(BOT_NOT_ASSIGNED)); return MOD_CONT; } if (!ci->c || !ci->c->FindUser(ci->bi)) { - source.Reply(LanguageString::BOT_NOT_ON_CHANNEL, ci->name.c_str()); + source.Reply(_(BOT_NOT_ON_CHANNEL), ci->name.c_str()); return MOD_CONT; } diff --git a/modules/core/bs_set.cpp b/modules/core/bs_set.cpp index 3e9bf13a0..8439ef9e7 100644 --- a/modules/core/bs_set.cpp +++ b/modules/core/bs_set.cpp @@ -39,7 +39,7 @@ class CommandBSSet : public Command if (!(bi = findbot(chan))) { - source.Reply(LanguageString::BOT_DOES_NOT_EXIST, chan.c_str()); + source.Reply(_(BOT_DOES_NOT_EXIST), chan.c_str()); return MOD_CONT; } @@ -58,9 +58,9 @@ class CommandBSSet : public Command return MOD_CONT; } else if (!(ci = cs_findchan(chan))) - source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str()); + source.Reply(_(CHAN_X_NOT_REGISTERED), chan.c_str()); else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_SET)) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else { bool override = !check_access(u, ci, CA_SET); @@ -192,7 +192,7 @@ class CommandBSSet : public Command SyntaxError(source, "SET MSG", _("SET \037channel\037 MSG {\037OFF|PRIVMSG|NOTICE|\037}")); } else - source.Reply(LanguageString::UNKNOWN_OPTION, option.c_str(), this->name.c_str()); + source.Reply(_(UNKNOWN_OPTION), option.c_str(), this->name.c_str()); } return MOD_CONT; diff --git a/modules/core/bs_unassign.cpp b/modules/core/bs_unassign.cpp index f7201c905..d9c17b617 100644 --- a/modules/core/bs_unassign.cpp +++ b/modules/core/bs_unassign.cpp @@ -29,11 +29,11 @@ class CommandBSUnassign : public Command ChannelInfo *ci = source.ci; if (readonly) - source.Reply(LanguageString::BOT_ASSIGN_READONLY); + source.Reply(_(BOT_ASSIGN_READONLY)); else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_ASSIGN)) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!ci->bi) - source.Reply(LanguageString::BOT_NOT_ASSIGNED); + source.Reply(_(BOT_NOT_ASSIGNED)); else if (ci->HasFlag(CI_PERSIST) && !cm) source.Reply(_("You can not unassign bots while persist is set on the channel.")); else diff --git a/modules/core/cs_access.cpp b/modules/core/cs_access.cpp index b119fb9d7..413652974 100644 --- a/modules/core/cs_access.cpp +++ b/modules/core/cs_access.cpp @@ -39,7 +39,7 @@ class AccessListCallback : public NumberList if (!SentHeader) { SentHeader = true; - source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, source.ci->name.c_str()); + source.Reply(_(CHAN_ACCESS_LIST_HEADER), source.ci->name.c_str()); } DoList(source, Number - 1, source.ci->GetAccess(Number - 1)); @@ -72,7 +72,7 @@ class AccessViewCallback : public AccessListCallback if (!SentHeader) { SentHeader = true; - source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, source.ci->name.c_str()); + source.Reply(_(CHAN_ACCESS_LIST_HEADER), source.ci->name.c_str()); } DoList(source, Number - 1, source.ci->GetAccess(Number - 1)); @@ -92,10 +92,10 @@ class AccessViewCallback : public AccessListCallback if (ci->HasFlag(CI_XOP)) { Anope::string xop = get_xop_level(access->level); - source.Reply(LanguageString::CHAN_ACCESS_VIEW_XOP_FORMAT, Number + 1, xop.c_str(), access->mask.c_str(), access->creator.c_str(), timebuf.c_str()); + source.Reply(_(CHAN_ACCESS_VIEW_XOP_FORMAT), Number + 1, xop.c_str(), access->mask.c_str(), access->creator.c_str(), timebuf.c_str()); } else - source.Reply(LanguageString::CHAN_ACCESS_VIEW_AXS_FORMAT, Number + 1, access->level, access->mask.c_str(), access->creator.c_str(), timebuf.c_str()); + source.Reply(_(CHAN_ACCESS_VIEW_AXS_FORMAT), Number + 1, access->level, access->mask.c_str(), access->creator.c_str(), timebuf.c_str()); } }; @@ -117,7 +117,7 @@ class AccessDelCallback : public NumberList ~AccessDelCallback() { if (Denied && !Deleted) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!Deleted) source.Reply(_("No matching entries on %s access list."), source.ci->name.c_str()); else @@ -181,7 +181,7 @@ class CommandCSAccess : public Command int16 u_level = u_access ? u_access->level : 0; if (level >= u_level && !u->Account()->HasPriv("chanserv/access/modify")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -192,7 +192,7 @@ class CommandCSAccess : public Command } else if (level <= ACCESS_INVALID || level >= ACCESS_FOUNDER) { - source.Reply(LanguageString::CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1); + source.Reply(_(CHAN_ACCESS_LEVEL_RANGE), ACCESS_INVALID + 1, ACCESS_FOUNDER - 1); return MOD_CONT; } @@ -203,7 +203,7 @@ class CommandCSAccess : public Command mask += "!*@*"; else if (na && na->HasFlag(NS_FORBIDDEN)) { - source.Reply(LanguageString::NICK_X_FORBIDDEN, mask.c_str()); + source.Reply(_(NICK_X_FORBIDDEN), mask.c_str()); return MOD_CONT; } @@ -213,7 +213,7 @@ class CommandCSAccess : public Command /* Don't allow lowering from a level >= u_level */ if (access->level >= u_level && !u->Account()->HasPriv("chanserv/access/modify")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } if (access->level == level) @@ -268,7 +268,7 @@ class CommandCSAccess : public Command if (!access) source.Reply(_("\002%s\002 not found on %s access list."), mask.c_str(), ci->name.c_str()); else if (access->nc != u->Account() && check_access(u, ci, CA_NOJOIN) && u_level <= access->level && !u->Account()->HasPriv("chanserv/access/modify")) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else { source.Reply(_("\002%s\002 deleted from %s access list."), access->mask.c_str(), ci->name.c_str()); @@ -311,7 +311,7 @@ class CommandCSAccess : public Command if (!SentHeader) { SentHeader = true; - source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, ci->name.c_str()); + source.Reply(_(CHAN_ACCESS_LIST_HEADER), ci->name.c_str()); } AccessListCallback::DoList(source, i, access); @@ -353,7 +353,7 @@ class CommandCSAccess : public Command if (!SentHeader) { SentHeader = true; - source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, ci->name.c_str()); + source.Reply(_(CHAN_ACCESS_LIST_HEADER), ci->name.c_str()); } AccessViewCallback::DoList(source, i, access); @@ -374,7 +374,7 @@ class CommandCSAccess : public Command ChannelInfo *ci = source.ci; if (!IsFounder(u, ci) && !u->Account()->HasPriv("chanserv/access/modify")) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else { ci->ClearAccess(); @@ -427,7 +427,7 @@ class CommandCSAccess : public Command if (is_list || is_clear ? 0 : (cmd.equals_ci("DEL") ? (nick.empty() || !s.empty()) : s.empty())) this->OnSyntaxError(source, cmd); else if (!has_access) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); /* We still allow LIST and CLEAR in xOP mode, but not others */ else if (ci->HasFlag(CI_XOP) && !is_list && !is_clear) { @@ -689,7 +689,7 @@ class CommandCSLevels : public Command else if (ci->HasFlag(CI_XOP)) source.Reply(_("Levels are not available as xOP is enabled on this channel.")); else if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("chanserv/access/modify")) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (cmd.equals_ci("SET")) this->DoSet(source, params); else if (cmd.equals_ci("DIS") || cmd.equals_ci("DISABLE")) diff --git a/modules/core/cs_akick.cpp b/modules/core/cs_akick.cpp index e3ebeeb2a..3761e95de 100644 --- a/modules/core/cs_akick.cpp +++ b/modules/core/cs_akick.cpp @@ -83,7 +83,7 @@ class AkickListCallback : public NumberList static void DoList(CommandSource &source, unsigned index, AutoKick *akick) { - source.Reply(_(" %3d %s (%s)"), index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->reason.empty() ? akick->reason.c_str() : GetString(source.u->Account(), LanguageString::NO_REASON).c_str()); + source.Reply(_(" %3d %s (%s)"), index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->reason.empty() ? akick->reason.c_str() : _(NO_REASON)); } }; @@ -110,15 +110,14 @@ class AkickViewCallback : public AkickListCallback static void DoList(CommandSource &source, unsigned index, AutoKick *akick) { - User *u = source.u; Anope::string timebuf; if (akick->addtime) timebuf = do_strftime(akick->addtime); else - timebuf = GetString(u->Account(), LanguageString::UNKNOWN); + timebuf = _(UNKNOWN); - source.Reply(LanguageString::CHAN_AKICK_VIEW_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->creator.empty() ? akick->creator.c_str() : GetString(u->Account(), LanguageString::UNKNOWN).c_str(), timebuf.c_str(), !akick->reason.empty() ? akick->reason.c_str() : GetString(u->Account(), LanguageString::NO_REASON).c_str()); + source.Reply(_(CHAN_AKICK_VIEW_FORMAT), index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->creator.empty() ? akick->creator.c_str() : UNKNOWN, timebuf.c_str(), !akick->reason.empty() ? akick->reason.c_str() : _(NO_REASON)); if (akick->last_used) source.Reply(_(" Last used %s"), do_strftime(akick->last_used).c_str()); @@ -184,7 +183,7 @@ class CommandCSAKick : public Command { if (na->HasFlag(NS_FORBIDDEN)) { - source.Reply(LanguageString::NICK_X_FORBIDDEN, mask.c_str()); + source.Reply(_(NICK_X_FORBIDDEN), mask.c_str()); return; } @@ -194,7 +193,7 @@ class CommandCSAKick : public Command /* Check excepts BEFORE we get this far */ if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && is_excepted_mask(ci, mask)) { - source.Reply(LanguageString::CHAN_EXCEPTED, mask.c_str(), ci->name.c_str()); + source.Reply(_(CHAN_EXCEPTED), mask.c_str(), ci->name.c_str()); return; } @@ -206,7 +205,7 @@ class CommandCSAKick : public Command int16 nc_level = nc_access ? nc_access->level : 0, u_level = u_access ? u_access->level : 0; if (nc == ci->founder || nc_level >= u_level) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return; } } @@ -224,7 +223,7 @@ class CommandCSAKick : public Command if ((check_access(u2, ci, CA_FOUNDER) || u2_level >= u_level) && entry_mask.Matches(u2)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return; } } @@ -245,7 +244,7 @@ class CommandCSAKick : public Command Anope::string buf = na2->nick + "!" + na2->last_usermask; if (Anope::Match(buf, mask)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return; } } @@ -443,7 +442,7 @@ class CommandCSAKick : public Command if (!c) { - source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str()); + source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str()); return; } @@ -490,7 +489,7 @@ class CommandCSAKick : public Command if (mask.empty() && (cmd.equals_ci("ADD") || cmd.equals_ci("DEL"))) this->OnSyntaxError(source, cmd); else if (!check_access(u, ci, CA_AKICK) && !u->Account()->HasPriv("chanserv/access/modify")) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!cmd.equals_ci("LIST") && !cmd.equals_ci("VIEW") && !cmd.equals_ci("ENFORCE") && readonly) source.Reply(_("Sorry, channel autokick list modification is temporarily disabled.")); else if (cmd.equals_ci("ADD")) diff --git a/modules/core/cs_ban.cpp b/modules/core/cs_ban.cpp index 8f85a0a48..b269e7492 100644 --- a/modules/core/cs_ban.cpp +++ b/modules/core/cs_ban.cpp @@ -37,21 +37,21 @@ class CommandCSBan : public Command uint16 u_level = u_access ? u_access->level : 0, u2_level = u2_access ? u2_access->level : 0; if (!c) - source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str()); + source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str()); else if (!u2) - source.Reply(LanguageString::NICK_X_NOT_IN_USE, target.c_str()); + source.Reply(_(NICK_X_NOT_IN_USE), target.c_str()); else if (!is_same ? !check_access(u, ci, CA_BAN) : !check_access(u, ci, CA_BANME)) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!is_same && ci->HasFlag(CI_PEACE) && u2_level >= u_level) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); /* * Dont ban/kick the user on channels where he is excepted * to prevent services <-> server wars. */ else if (matches_list(ci->c, u2, CMODE_EXCEPT)) - source.Reply(LanguageString::CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str()); + source.Reply(_(CHAN_EXCEPTED), u2->nick.c_str(), ci->name.c_str()); else if (u2->IsProtected()) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else { Anope::string mask; diff --git a/modules/core/cs_clearusers.cpp b/modules/core/cs_clearusers.cpp index ef82240fc..2c11a132b 100644 --- a/modules/core/cs_clearusers.cpp +++ b/modules/core/cs_clearusers.cpp @@ -32,9 +32,9 @@ class CommandCSClearUsers : public Command Anope::string modebuf; if (!c) - source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str()); + source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str()); else if (!check_access(u, ci, CA_FOUNDER)) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); Anope::string buf = "CLEARUSERS command from " + u->nick + " (" + u->Account()->display + ")"; diff --git a/modules/core/cs_clone.cpp b/modules/core/cs_clone.cpp index 2e0759807..82f6bb961 100644 --- a/modules/core/cs_clone.cpp +++ b/modules/core/cs_clone.cpp @@ -32,24 +32,24 @@ public: if (!check_access(u, ci, CA_SET)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } ChannelInfo *target_ci = cs_findchan(target); if (!target_ci) { - source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, target.c_str()); + source.Reply(_(CHAN_X_NOT_REGISTERED), target.c_str()); return MOD_CONT; } if (!IsFounder(u, ci) || !IsFounder(u, target_ci)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } if (Config->CSMaxReg && u->Account()->channelcount >= Config->CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit")) { - source.Reply(u->Account()->channelcount > Config->CSMaxReg ? LanguageString::CHAN_EXCEEDED_CHANNEL_LIMIT : LanguageString::CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg); + source.Reply(u->Account()->channelcount > Config->CSMaxReg ? _(CHAN_EXCEEDED_CHANNEL_LIMIT) : _(CHAN_REACHED_CHANNEL_LIMIT), Config->CSMaxReg); return MOD_CONT; } diff --git a/modules/core/cs_drop.cpp b/modules/core/cs_drop.cpp index 3b10a95f8..87de45c0f 100644 --- a/modules/core/cs_drop.cpp +++ b/modules/core/cs_drop.cpp @@ -40,19 +40,19 @@ class CommandCSDrop : public Command if (ci->HasFlag(CI_FORBIDDEN) && !u->Account()->HasCommand("chanserv/drop")) { - source.Reply(LanguageString::CHAN_X_FORBIDDEN, chan.c_str()); + source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str()); return MOD_CONT; } if (ci->HasFlag(CI_SUSPENDED) && !u->Account()->HasCommand("chanserv/drop")) { - source.Reply(LanguageString::CHAN_X_FORBIDDEN, chan.c_str()); + source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str()); return MOD_CONT; } if ((ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)) && !u->Account()->HasCommand("chanserv/drop")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } diff --git a/modules/core/cs_forbid.cpp b/modules/core/cs_forbid.cpp index dabf27f2b..3d75b9233 100644 --- a/modules/core/cs_forbid.cpp +++ b/modules/core/cs_forbid.cpp @@ -38,13 +38,13 @@ class CommandCSForbid : public Command if (chan[0] != '#') { - source.Reply(LanguageString::CHAN_SYMBOL_REQUIRED); + source.Reply(_(CHAN_SYMBOL_REQUIRED)); return MOD_CONT; } if (readonly) { - source.Reply(LanguageString::READ_ONLY_MODE); + source.Reply(_(READ_ONLY_MODE)); return MOD_CONT; } @@ -75,7 +75,7 @@ class CommandCSForbid : public Command if (uc->user->HasMode(UMODE_OPER)) continue; - c->Kick(ChanServ, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), _("This channel has been forbidden.")).c_str()); + c->Kick(ChanServ, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), "This channel has been forbidden.").c_str()); } } diff --git a/modules/core/cs_getkey.cpp b/modules/core/cs_getkey.cpp index a5a84616c..d1466d398 100644 --- a/modules/core/cs_getkey.cpp +++ b/modules/core/cs_getkey.cpp @@ -30,7 +30,7 @@ class CommandCSGetKey : public Command if (!check_access(u, ci, CA_GETKEY) && !u->Account()->HasCommand("chanserv/getkey")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } diff --git a/modules/core/cs_info.cpp b/modules/core/cs_info.cpp index 6ba34f3a5..8e239c099 100644 --- a/modules/core/cs_info.cpp +++ b/modules/core/cs_info.cpp @@ -48,9 +48,9 @@ class CommandCSInfo : public Command if (ci->HasFlag(CI_FORBIDDEN)) { if (u->HasMode(UMODE_OPER) && !ci->forbidby.empty()) - source.Reply(LanguageString::CHAN_X_FORBIDDEN_OPER, chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : GetString(u->Account(), LanguageString::NO_REASON).c_str()); + source.Reply(_(CHAN_X_FORBIDDEN_OPER), chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : _(NO_REASON)); else - source.Reply(LanguageString::CHAN_X_FORBIDDEN, chan.c_str()); + source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str()); return MOD_CONT; } @@ -59,7 +59,7 @@ class CommandCSInfo : public Command if (has_auspex || check_access(u, ci, CA_INFO)) show_all = true; - source.Reply(LanguageString::CHAN_INFO_HEADER, chan.c_str()); + source.Reply(_(CHAN_INFO_HEADER), chan.c_str()); source.Reply(_(" Founder: %s"), ci->founder->display.c_str()); if (show_all && ci->successor) @@ -81,35 +81,33 @@ class CommandCSInfo : public Command source.Reply(_(" Ban type: %d"), ci->bantype); Anope::string optbuf; - CheckOptStr(optbuf, CI_KEEPTOPIC, GetString(u->Account(), _("Topic Retention")), ci, u->Account()); - CheckOptStr(optbuf, CI_OPNOTICE, GetString(u->Account(), _("OP Notice")), ci, u->Account()); - CheckOptStr(optbuf, CI_PEACE, GetString(u->Account(), _("Peace")), ci, u->Account()); - CheckOptStr(optbuf, CI_PRIVATE, GetString(u->Account(), _("Private")), ci, u->Account()); - CheckOptStr(optbuf, CI_RESTRICTED, GetString(u->Account(), _("Restricted Access")), ci, u->Account()); - CheckOptStr(optbuf, CI_SECURE, GetString(u->Account(), _("Secure")), ci, u->Account()); - CheckOptStr(optbuf, CI_SECUREFOUNDER, GetString(u->Account(), _("Secure Founder")), ci, u->Account()); - CheckOptStr(optbuf, CI_SECUREOPS, GetString(u->Account(), _("Secure Ops")), ci, u->Account()); + CheckOptStr(optbuf, CI_KEEPTOPIC, _("Topic Retention"), ci, u->Account()); + CheckOptStr(optbuf, CI_OPNOTICE, _("OP Notice"), ci, u->Account()); + CheckOptStr(optbuf, CI_PEACE, _("Peace"), ci, u->Account()); + CheckOptStr(optbuf, CI_PRIVATE, _("Private"), ci, u->Account()); + CheckOptStr(optbuf, CI_RESTRICTED, _("Restricted Access"), ci, u->Account()); + CheckOptStr(optbuf, CI_SECURE, _("Secure"), ci, u->Account()); + CheckOptStr(optbuf, CI_SECUREFOUNDER, _("Secure Founder"), ci, u->Account()); + CheckOptStr(optbuf, CI_SECUREOPS, _("Secure Ops"), ci, u->Account()); if (ci->HasFlag(CI_SIGNKICK)) - CheckOptStr(optbuf, CI_SIGNKICK, GetString(u->Account(), _("Signed kicks")), ci, u->Account()); + CheckOptStr(optbuf, CI_SIGNKICK, _("Signed kicks"), ci, u->Account()); else - CheckOptStr(optbuf, CI_SIGNKICK_LEVEL, GetString(u->Account(), _("Signed kicks")), ci, u->Account()); - CheckOptStr(optbuf, CI_TOPICLOCK, GetString(u->Account(), _("Topic Lock")), ci, u->Account()); - CheckOptStr(optbuf, CI_XOP, GetString(u->Account(), _("xOP lists system")), ci, u->Account()); - CheckOptStr(optbuf, CI_PERSIST, GetString(u->Account(), _("Persistant")), ci, u->Account()); + CheckOptStr(optbuf, CI_SIGNKICK_LEVEL, _("Signed kicks"), ci, u->Account()); + CheckOptStr(optbuf, CI_TOPICLOCK, _("Topic Lock"), ci, u->Account()); + CheckOptStr(optbuf, CI_XOP, _("xOP lists system"), ci, u->Account()); + CheckOptStr(optbuf, CI_PERSIST, _("Persistant"), ci, u->Account()); + CheckOptStr(optbuf, CI_NO_EXPIRE, _("No expire"), ci, u->Account()); - source.Reply(LanguageString::NICK_INFO_OPTIONS, optbuf.empty() ? _("None") : optbuf.c_str()); + source.Reply(_(NICK_INFO_OPTIONS), optbuf.empty() ? _("None") : optbuf.c_str()); source.Reply(_(" Mode lock: %s"), get_mlock_modes(ci, 1).c_str()); - // XXX: we could just as easily (and tidily) merge this in with the flags display above. - if (ci->HasFlag(CI_NO_EXPIRE)) - source.Reply(_("This channel will not expire.")); - else + if (!ci->HasFlag(CI_NO_EXPIRE)) source.Reply(_(" Expires on: %s"), do_strftime(ci->last_used + Config->CSExpire).c_str()); } if (ci->HasFlag(CI_SUSPENDED)) - source.Reply(_(" Suspended: [%s] %s"), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : GetString(u->Account(), LanguageString::NO_REASON).c_str()); + source.Reply(_(" Suspended: [%s] %s"), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : _(NO_REASON)); - FOREACH_MOD(I_OnChanInfo, OnChanInfo(u, ci, show_all)); + FOREACH_MOD(I_OnChanInfo, OnChanInfo(source, ci, show_all)); return MOD_CONT; } diff --git a/modules/core/cs_invite.cpp b/modules/core/cs_invite.cpp index 986d5c5ea..55efd6edf 100644 --- a/modules/core/cs_invite.cpp +++ b/modules/core/cs_invite.cpp @@ -31,7 +31,7 @@ class CommandCSInvite : public Command if (!(c = findchan(chan))) { - source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str()); + source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str()); return MOD_CONT; } @@ -39,7 +39,7 @@ class CommandCSInvite : public Command if (!check_access(u, ci, CA_INVITE)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -50,7 +50,7 @@ class CommandCSInvite : public Command { if (!(u2 = finduser(params[1]))) { - source.Reply(LanguageString::NICK_X_NOT_IN_USE, params[1].c_str()); + source.Reply(_(NICK_X_NOT_IN_USE), params[1].c_str()); return MOD_CONT; } } diff --git a/modules/core/cs_kick.cpp b/modules/core/cs_kick.cpp index 3e37b4b41..cd0c5c387 100644 --- a/modules/core/cs_kick.cpp +++ b/modules/core/cs_kick.cpp @@ -37,17 +37,17 @@ class CommandCSKick : public Command uint16 u_level = u_access ? u_access->level : 0, u2_level = u2_access ? u2_access->level : 0; if (!c) - source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str()); + source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str()); else if (!u2) - source.Reply(LanguageString::NICK_X_NOT_IN_USE, target.c_str()); + source.Reply(_(NICK_X_NOT_IN_USE), target.c_str()); else if (!is_same ? !check_access(u, ci, CA_KICK) : !check_access(u, ci, CA_KICKME)) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!is_same && (ci->HasFlag(CI_PEACE)) && u2_level >= u_level) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (u2->IsProtected()) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!c->FindUser(u2)) - source.Reply(LanguageString::NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str()); + source.Reply(_(NICK_X_NOT_ON_CHAN), u2->nick.c_str(), c->name.c_str()); else { // XXX diff --git a/modules/core/cs_list.cpp b/modules/core/cs_list.cpp index 4f1a95952..12da08ed3 100644 --- a/modules/core/cs_list.cpp +++ b/modules/core/cs_list.cpp @@ -36,7 +36,7 @@ class CommandCSList : public Command if (Config->CSListOpersOnly && !u->HasMode(UMODE_OPER)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -52,7 +52,7 @@ class CommandCSList : public Command } catch (const ConvertException &) { - source.Reply(LanguageString::LIST_INCORRECT_RANGE); + source.Reply(_(LIST_INCORRECT_RANGE)); source.Reply(_("To search for channels starting with #, search for the channel\n" "name without the #-sign prepended (\002anope\002 instead of \002#anope\002).")); return MOD_CONT; @@ -80,7 +80,7 @@ class CommandCSList : public Command Anope::string spattern = "#" + pattern; - source.Reply(LanguageString::LIST_HEADER, pattern.c_str()); + source.Reply(_(LIST_HEADER), pattern.c_str()); for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it) { @@ -133,7 +133,7 @@ class CommandCSList : public Command void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "LIST", LanguageString::NICK_LIST_SYNTAX); + SyntaxError(source, "LIST", _(NICK_LIST_SYNTAX)); } }; diff --git a/modules/core/cs_mode.cpp b/modules/core/cs_mode.cpp index a295c6d3d..6399bdc35 100644 --- a/modules/core/cs_mode.cpp +++ b/modules/core/cs_mode.cpp @@ -266,9 +266,9 @@ class CommandCSMode : public Command ChannelInfo *ci = source.ci; if (!ci || !ci->c) - source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str()); + source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str()); else if (!check_access(u, ci, CA_MODE) && !u->Account()->HasCommand("chanserv/mode")) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (subcommand.equals_ci("LOCK")) this->DoLock(source, params); else if (subcommand.equals_ci("SET")) diff --git a/modules/core/cs_modes.cpp b/modules/core/cs_modes.cpp index b7ddc3971..e51274996 100644 --- a/modules/core/cs_modes.cpp +++ b/modules/core/cs_modes.cpp @@ -54,19 +54,19 @@ class CommandModeBase : public Command uint16 u_level = u_access ? u_access->level : 0, u2_level = u2_access ? u2_access->level : 0; if (!c) - source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str()); + source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str()); else if (!ci) - source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str()); + source.Reply(_(CHAN_X_NOT_REGISTERED), chan.c_str()); else if (!u2) - source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str()); + source.Reply(_(NICK_X_NOT_IN_USE), nick.c_str()); else if (is_same ? !check_access(u, ci, levelself) : !check_access(u, ci, level)) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!set && !is_same && ci->HasFlag(CI_PEACE) && u2_level >= u_level) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!set && u2->IsProtected() && !is_same) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else if (!c->FindUser(u2)) - source.Reply(LanguageString::NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str()); + source.Reply(_(NICK_X_NOT_ON_CHAN), u2->nick.c_str(), c->name.c_str()); else { if (set) diff --git a/modules/core/cs_register.cpp b/modules/core/cs_register.cpp index ebcc76811..34cdc50df 100644 --- a/modules/core/cs_register.cpp +++ b/modules/core/cs_register.cpp @@ -40,15 +40,15 @@ class CommandCSRegister : public Command if (chan[0] == '&') source.Reply(_("Local channels cannot be registered.")); else if (chan[0] != '#') - source.Reply(LanguageString::CHAN_SYMBOL_REQUIRED); + source.Reply(_(CHAN_SYMBOL_REQUIRED)); else if (!ircdproto->IsChannelValid(chan)) - source.Reply(LanguageString::CHAN_X_INVALID, chan.c_str()); + source.Reply(_(CHAN_X_INVALID), chan.c_str()); else if (ci) source.Reply(_("Channel \002%s\002 is already registered!"), chan.c_str()); else if (c && !c->HasUserStatus(u, CMODE_OP)) source.Reply(_("You must be a channel operator to register the channel.")); else if (Config->CSMaxReg && u->Account()->channelcount >= Config->CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit")) - source.Reply(u->Account()->channelcount > Config->CSMaxReg ? LanguageString::CHAN_EXCEEDED_CHANNEL_LIMIT : LanguageString::CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg); + source.Reply(u->Account()->channelcount > Config->CSMaxReg ? _(CHAN_EXCEEDED_CHANNEL_LIMIT) : _(CHAN_REACHED_CHANNEL_LIMIT), Config->CSMaxReg); else { ci = new ChannelInfo(chan); diff --git a/modules/core/cs_saset.cpp b/modules/core/cs_saset.cpp index 876a487a3..c419d7141 100644 --- a/modules/core/cs_saset.cpp +++ b/modules/core/cs_saset.cpp @@ -35,14 +35,14 @@ class CommandCSSASet : public Command if (readonly) { - source.Reply(LanguageString::CHAN_SET_DISABLED); + source.Reply(_(CHAN_SET_DISABLED)); return MOD_CONT; } // XXX Remove after 1.9.4 release if (params[1].equals_ci("MLOCK")) { - source.Reply(LanguageString::CHAN_SET_MLOCK_DEPRECATED); + source.Reply(_(CHAN_SET_MLOCK_DEPRECATED)); return MOD_CONT; } @@ -60,7 +60,7 @@ class CommandCSSASet : public Command else { source.Reply(_("Unknown SASET option \002%s\002."), params[1].c_str()); - source.Reply(LanguageString::MORE_INFO, Config->s_ChanServ.c_str(), "SET"); + source.Reply(_(MORE_INFO), Config->s_ChanServ.c_str(), "SET"); } return MOD_CONT; @@ -95,7 +95,7 @@ class CommandCSSASet : public Command void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX); + SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX)); } bool AddSubcommand(Module *creator, Command *c) diff --git a/modules/core/cs_set.cpp b/modules/core/cs_set.cpp index e089d4a2a..bfb708cac 100644 --- a/modules/core/cs_set.cpp +++ b/modules/core/cs_set.cpp @@ -35,19 +35,19 @@ class CommandCSSet : public Command if (readonly) { - source.Reply(LanguageString::CHAN_SET_DISABLED); + source.Reply(_(CHAN_SET_DISABLED)); return MOD_CONT; } if (!check_access(u, cs_findchan(params[0]), CA_SET)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } // XXX Remove after 1.9.4 release if (params[1].equals_ci("MLOCK")) { - source.Reply(LanguageString::CHAN_SET_MLOCK_DEPRECATED, Config->s_ChanServ.c_str()); + source.Reply(_(CHAN_SET_MLOCK_DEPRECATED), Config->s_ChanServ.c_str()); return MOD_CONT; } @@ -63,8 +63,8 @@ class CommandCSSet : public Command } else { - source.Reply(LanguageString::NICK_SET_UNKNOWN_OPTION, params[1].c_str()); - source.Reply(LanguageString::MORE_INFO, Config->s_ChanServ.c_str(), "SET"); + source.Reply(_(NICK_SET_UNKNOWN_OPTION), params[1].c_str()); + source.Reply(_(MORE_INFO), Config->s_ChanServ.c_str(), "SET"); } return MOD_CONT; @@ -99,7 +99,7 @@ class CommandCSSet : public Command void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX); + SyntaxError(source, "SET", _(CHAN_SET_SYNTAX)); } bool AddSubcommand(Module *creator, Command *c) diff --git a/modules/core/cs_set_bantype.cpp b/modules/core/cs_set_bantype.cpp index d509bffe9..1059c2fc9 100644 --- a/modules/core/cs_set_bantype.cpp +++ b/modules/core/cs_set_bantype.cpp @@ -59,7 +59,7 @@ class CommandCSSetBanType : public Command void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX); + SyntaxError(source, "SET", _(CHAN_SET_SYNTAX)); } }; @@ -73,7 +73,7 @@ class CommandCSSASetBanType : public CommandCSSetBanType void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX); + SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX)); } }; diff --git a/modules/core/cs_set_description.cpp b/modules/core/cs_set_description.cpp index c0a7a5093..deebd5d1b 100644 --- a/modules/core/cs_set_description.cpp +++ b/modules/core/cs_set_description.cpp @@ -46,7 +46,7 @@ class CommandCSSetDescription : public Command void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX); + SyntaxError(source, "SET", _(CHAN_SET_SYNTAX)); } }; @@ -60,7 +60,7 @@ class CommandCSSASetDescription : public CommandCSSetDescription void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX); + SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX)); } }; diff --git a/modules/core/cs_set_founder.cpp b/modules/core/cs_set_founder.cpp index a9ba31291..a50d9e558 100644 --- a/modules/core/cs_set_founder.cpp +++ b/modules/core/cs_set_founder.cpp @@ -30,7 +30,7 @@ class CommandCSSetFounder : public Command if (this->permission.empty() && (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER))) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -39,12 +39,12 @@ class CommandCSSetFounder : public Command if (!na) { - source.Reply(LanguageString::NICK_X_NOT_REGISTERED, params[1].c_str()); + source.Reply(_(NICK_X_NOT_REGISTERED), params[1].c_str()); return MOD_CONT; } else if (na->HasFlag(NS_FORBIDDEN)) { - source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str()); + source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str()); return MOD_CONT; } @@ -82,7 +82,7 @@ class CommandCSSetFounder : public Command void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX); + SyntaxError(source, "SET", _(CHAN_SET_SYNTAX)); } }; @@ -96,7 +96,7 @@ class CommandCSSASetFounder : public CommandCSSetFounder void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX); + SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX)); } }; diff --git a/modules/core/cs_set_securefounder.cpp b/modules/core/cs_set_securefounder.cpp index c90d7d20c..67045baba 100644 --- a/modules/core/cs_set_securefounder.cpp +++ b/modules/core/cs_set_securefounder.cpp @@ -30,7 +30,7 @@ class CommandCSSetSecureFounder : public Command if (this->permission.empty() && ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } diff --git a/modules/core/cs_set_successor.cpp b/modules/core/cs_set_successor.cpp index ad0b57fea..9cb572a96 100644 --- a/modules/core/cs_set_successor.cpp +++ b/modules/core/cs_set_successor.cpp @@ -30,7 +30,7 @@ class CommandCSSetSuccessor : public Command if (this->permission.empty() && ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -42,12 +42,12 @@ class CommandCSSetSuccessor : public Command if (!na) { - source.Reply(LanguageString::NICK_X_NOT_REGISTERED, params[1].c_str()); + source.Reply(_(NICK_X_NOT_REGISTERED), params[1].c_str()); return MOD_CONT; } if (na->HasFlag(NS_FORBIDDEN)) { - source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str()); + source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str()); return MOD_CONT; } if (na->nc == ci->founder) @@ -89,7 +89,7 @@ class CommandCSSetSuccessor : public Command void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX); + SyntaxError(source, "SET", _(CHAN_SET_SYNTAX)); } }; @@ -103,7 +103,7 @@ class CommandCSSASetSuccessor : public CommandCSSetSuccessor void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX); + SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX)); } }; diff --git a/modules/core/cs_suspend.cpp b/modules/core/cs_suspend.cpp index 82eac64a2..669354151 100644 --- a/modules/core/cs_suspend.cpp +++ b/modules/core/cs_suspend.cpp @@ -44,7 +44,7 @@ class CommandCSSuspend : public Command } if (readonly) - source.Reply(LanguageString::READ_ONLY_MODE); + source.Reply(_(READ_ONLY_MODE)); ci->SetFlag(CI_SUSPENDED); ci->forbidby = u->nick; @@ -60,7 +60,7 @@ class CommandCSSuspend : public Command if (uc->user->HasMode(UMODE_OPER)) continue; - c->Kick(NULL, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), _("This channel has been suspended.")).c_str()); + c->Kick(NULL, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), "This channel has been suspended.").c_str()); } } @@ -105,7 +105,7 @@ class CommandCSUnSuspend : public Command ChannelInfo *ci = source.ci; if (readonly) - source.Reply(LanguageString::READ_ONLY_MODE); + source.Reply(_(READ_ONLY_MODE)); /* Only UNSUSPEND already suspended channels */ if (!ci->HasFlag(CI_SUSPENDED)) diff --git a/modules/core/cs_topic.cpp b/modules/core/cs_topic.cpp index a470713d4..bdd8a3205 100644 --- a/modules/core/cs_topic.cpp +++ b/modules/core/cs_topic.cpp @@ -30,9 +30,9 @@ class CommandCSTopic : public Command Channel *c = ci->c; if (!c) - source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str()); + source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str()); else if (!check_access(u, ci, CA_TOPIC) && !u->Account()->HasCommand("chanserv/topic")) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else { bool has_topiclock = ci->HasFlag(CI_TOPICLOCK); diff --git a/modules/core/cs_unban.cpp b/modules/core/cs_unban.cpp index 32f88b8bd..a681d1100 100644 --- a/modules/core/cs_unban.cpp +++ b/modules/core/cs_unban.cpp @@ -29,13 +29,13 @@ class CommandCSUnban : public Command if (!c) { - source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str()); + source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str()); return MOD_CONT; } if (!check_access(u, ci, CA_UNBAN)) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -45,7 +45,7 @@ class CommandCSUnban : public Command if (!u2) { - source.Reply(LanguageString::NICK_X_NOT_IN_USE, params[1].c_str()); + source.Reply(_(NICK_X_NOT_IN_USE), params[1].c_str()); return MOD_CONT; } diff --git a/modules/core/cs_xop.cpp b/modules/core/cs_xop.cpp index 066e19471..a3e3937d1 100644 --- a/modules/core/cs_xop.cpp +++ b/modules/core/cs_xop.cpp @@ -133,7 +133,7 @@ class XOPBase : public Command if ((level >= ulev || ulev < ACCESS_AOP) && !u->Account()->HasPriv("chanserv/access/modify")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -142,7 +142,7 @@ class XOPBase : public Command mask += "!*@*"; else if (na && na->HasFlag(NS_FORBIDDEN)) { - source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str()); + source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str()); return MOD_CONT; } @@ -154,7 +154,7 @@ class XOPBase : public Command **/ if (access->level >= ulev && !u->Account()->HasPriv("chanserv/access/modify")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } ++change; @@ -222,7 +222,7 @@ class XOPBase : public Command if ((!access || access->nc != u->Account()) && (level >= ulev || ulev < ACCESS_AOP) && !u->Account()->HasPriv("chanserv/access/modify")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -243,7 +243,7 @@ class XOPBase : public Command else { if (access->nc != u->Account() && ulev <= access->level && !u->Account()->HasPriv("chanserv/access/modify")) - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); else { bool override = ulev <= access->level; @@ -272,7 +272,7 @@ class XOPBase : public Command if (!ulev && !u->Account()->HasCommand("chanserv/access/list")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } @@ -338,7 +338,7 @@ class XOPBase : public Command if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("chanserv/access/modify")) { - source.Reply(LanguageString::ACCESS_DENIED); + source.Reply(_(ACCESS_DENIED)); return MOD_CONT; } diff --git a/modules/core/hs_del.cpp b/modules/core/hs_del.cpp index 1503ca014..351909ec5 100644 --- a/modules/core/hs_del.cpp +++ b/modules/core/hs_del.cpp @@ -30,7 +30,7 @@ class CommandHSDel : public Command { if (na->HasFlag(NS_FORBIDDEN)) { - source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str()); + source.Reply(_(NICK_X_FORBIDDEN), nick.c_str()); return MOD_CONT; } Log(LOG_ADMIN, u, this) << "for user " << na->nick; @@ -39,7 +39,7 @@ class CommandHSDel : public Command source.Reply(_("vhost for \002%s\002 removed."), nick.c_str()); } else - source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str()); + source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str()); return MOD_CONT; } diff --git a/modules/core/hs_delall.cpp b/modules/core/hs_delall.cpp index c641f05b2..248d650ae 100644 --- a/modules/core/hs_delall.cpp +++ b/modules/core/hs_delall.cpp @@ -30,7 +30,7 @@ class CommandHSDelAll : public Command { if (na->HasFlag(NS_FORBIDDEN)) { - source.Reply(LanguageString::NICK_X_FORBID