diff options
author | Adam <Adam@anope.org> | 2011-02-26 17:54:03 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-02-26 17:54:03 -0500 |
commit | f234a2bfab8a4d900cfc0df91afed530d80738d4 (patch) | |
tree | 0224eb342a7d60cee86995bd87910f858d7a2e53 /modules/core/ns_set.cpp | |
parent | 28d17a40cef64783addf177fa30fb267db2cbde7 (diff) |
Replaced the few language strings we use with #defines to prevent accidentally translating them if we shouldnt
Diffstat (limited to 'modules/core/ns_set.cpp')
-rw-r--r-- | modules/core/ns_set.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/core/ns_set.cpp b/modules/core/ns_set.cpp index 86272c084..8e5e27033 100644 --- a/modules/core/ns_set.cpp +++ b/modules/core/ns_set.cpp @@ -35,13 +35,13 @@ class CommandNSSet : public Command if (readonly) { - source.Reply(LanguageString::NICK_SET_DISABLED); + source.Reply(_(NICK_SET_DISABLED)); return MOD_CONT; } if (u->Account()->HasFlag(NI_SUSPENDED)) { - source.Reply(LanguageString::NICK_X_SUSPENDED, u->Account()->display.c_str()); + source.Reply(_(NICK_X_SUSPENDED), u->Account()->display.c_str()); return MOD_CONT; } @@ -60,7 +60,7 @@ class CommandNSSet : public Command mod_run_cmd(NickServ, u, NULL, c, params[0], cmdparams); } else - source.Reply(LanguageString::NICK_SET_UNKNOWN_OPTION, params[0].c_str()); + source.Reply(_(NICK_SET_UNKNOWN_OPTION), params[0].c_str()); return MOD_CONT; } @@ -95,7 +95,7 @@ class CommandNSSet : public Command void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX); + SyntaxError(source, "SET", _(NICK_SET_SYNTAX)); } bool AddSubcommand(Module *creator, Command *c) @@ -136,12 +136,12 @@ class CommandNSSetDisplay : public Command if (!na || na->nc != u->Account()) { - source.Reply(LanguageString::NICK_SASET_DISPLAY_INVALID, u->Account()->display.c_str()); + source.Reply(_(NICK_SASET_DISPLAY_INVALID), u->Account()->display.c_str()); return MOD_CONT; } change_core_display(u->Account(), params[1]); - source.Reply(LanguageString::NICK_SET_DISPLAY_CHANGED, u->Account()->display.c_str()); + source.Reply(_(NICK_SET_DISPLAY_CHANGED), u->Account()->display.c_str()); return MOD_CONT; } @@ -157,7 +157,7 @@ class CommandNSSetDisplay : public Command void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX); + SyntaxError(source, "SET", _(NICK_SET_SYNTAX)); } }; @@ -178,27 +178,27 @@ class CommandNSSetPassword : public Command if (u->Account()->display.equals_ci(param) || (Config->StrictPasswords && len < 5)) { - source.Reply(LanguageString::MORE_OBSCURE_PASSWORD); + source.Reply(_(MORE_OBSCURE_PASSWORD)); return MOD_CONT; } else if (len > Config->PassLen) { - source.Reply(LanguageString::PASSWORD_TOO_LONG); + source.Reply(_(PASSWORD_TOO_LONG)); return MOD_CONT; } if (enc_encrypt(param, u->Account()->pass) < 0) { Log(NickServ) << "Failed to encrypt password for " << u->Account()->display << " (set)"; - source.Reply(LanguageString::NICK_SASET_PASSWORD_FAILED); + source.Reply(_(NICK_SASET_PASSWORD_FAILED)); return MOD_CONT; } Anope::string tmp_pass; if (enc_decrypt(u->Account()->pass, tmp_pass) == 1) - source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED_TO, u->Account()->display.c_str(), tmp_pass.c_str()); + source.Reply(_(NICK_SASET_PASSWORD_CHANGED_TO), u->Account()->display.c_str(), tmp_pass.c_str()); else - source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED, u->Account()->display.c_str()); + source.Reply(_(NICK_SASET_PASSWORD_CHANGED), u->Account()->display.c_str()); return MOD_CONT; } @@ -215,7 +215,7 @@ class CommandNSSetPassword : public Command void OnSyntaxError(CommandSource &source, const Anope::string &) { // XXX - SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX); + SyntaxError(source, "SET", _(NICK_SET_SYNTAX)); } }; |