diff options
author | Adam <Adam@anope.org> | 2010-09-26 02:33:01 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-09-26 02:33:01 -0400 |
commit | d646d455e2655be59f6d5bcc56710ac70548ca37 (patch) | |
tree | d236b9d4991d62538a0318f213416396734e72e0 /modules/core/ns_saset.cpp | |
parent | 05e6815d912f0418f6da25a2106dd718796f02fa (diff) |
Changed the language system to use gettext
Diffstat (limited to 'modules/core/ns_saset.cpp')
-rw-r--r-- | modules/core/ns_saset.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/modules/core/ns_saset.cpp b/modules/core/ns_saset.cpp index c6494d292..229f48e8c 100644 --- a/modules/core/ns_saset.cpp +++ b/modules/core/ns_saset.cpp @@ -35,17 +35,17 @@ class CommandNSSASet : public Command if (readonly) { - notice_lang(Config->s_NickServ, u, NICK_SASET_DISABLED); + u->SendMessage(NickServ, NICK_SET_DISABLED); return MOD_CONT; } NickAlias *na = findnick(nick); if (!na) - notice_lang(Config->s_NickServ, u, NICK_SASET_BAD_NICK, nick.c_str()); + u->SendMessage(NickServ, NICK_SASET_BAD_NICK, nick.c_str()); else if (na->HasFlag(NS_FORBIDDEN)) - notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str()); + u->SendMessage(NickServ, NICK_X_FORBIDDEN, na->nick.c_str()); else if (na->nc->HasFlag(NI_SUSPENDED)) - notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str()); + u->SendMessage(NickServ, NICK_X_SUSPENDED, na->nick.c_str()); else { Command *c = this->FindCommand(params[1]); @@ -59,7 +59,7 @@ class CommandNSSASet : public Command mod_run_cmd(NickServ, u, c, params[1], cmdparams); } else - notice_lang(Config->s_NickServ, u, NICK_SASET_UNKNOWN_OPTION, cmd.c_str()); + u->SendMessage(NickServ, NICK_SASET_UNKNOWN_OPTION, cmd.c_str()); } return MOD_CONT; @@ -69,10 +69,10 @@ class CommandNSSASet : public Command { if (subcommand.empty()) { - notice_help(Config->s_NickServ, u, NICK_HELP_SASET_HEAD); + u->SendMessage(NickServ, NICK_HELP_SASET_HEAD); for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it) it->second->OnServHelp(u); - notice_help(Config->s_NickServ, u, NICK_HELP_SASET_TAIL); + u->SendMessage(NickServ, NICK_HELP_SASET_TAIL); return true; } else @@ -88,12 +88,12 @@ class CommandNSSASet : public Command void OnSyntaxError(User *u, const Anope::string &subcommand) { - syntax_error(Config->s_NickServ, u, "SASET", NICK_SASET_SYNTAX); + SyntaxError(NickServ, u, "SASET", NICK_SASET_SYNTAX); } void OnServHelp(User *u) { - notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET); + u->SendMessage(NickServ, NICK_HELP_CMD_SASET); } bool AddSubcommand(Command *c) @@ -133,30 +133,30 @@ class CommandNSSASetDisplay : public Command NickAlias *na = findnick(params[1]); if (!na || na->nc != nc) { - notice_lang(Config->s_NickServ, u, NICK_SASET_DISPLAY_INVALID, nc->display.c_str()); + u->SendMessage(NickServ, NICK_SASET_DISPLAY_INVALID, nc->display.c_str()); return MOD_CONT; } change_core_display(nc, params[1]); - notice_lang(Config->s_NickServ, u, NICK_SASET_DISPLAY_CHANGED, nc->display.c_str()); + u->SendMessage(NickServ, NICK_SET_DISPLAY_CHANGED, nc->display.c_str()); return MOD_CONT; } bool OnHelp(User *u, const Anope::string &) { - notice_help(Config->s_NickServ, u, NICK_HELP_SASET_DISPLAY); + u->SendMessage(NickServ, NICK_HELP_SASET_DISPLAY); return true; } void OnSyntaxError(User *u, const Anope::string &) { // XXX - syntax_error(Config->s_NickServ, u, "SASET", NICK_SASET_SYNTAX); + SyntaxError(NickServ, u, "SASET", NICK_SASET_SYNTAX); } void OnServHelp(User *u) { - notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_DISPLAY); + u->SendMessage(NickServ, NICK_HELP_CMD_SASET_DISPLAY); } }; @@ -177,17 +177,17 @@ class CommandNSSASetPassword : public Command if (Config->NSSecureAdmins && u->Account() != nc && nc->IsServicesOper()) { - notice_lang(Config->s_NickServ, u, ACCESS_DENIED); + u->SendMessage(NickServ, ACCESS_DENIED); return MOD_CONT; } else if (nc->display.equals_ci(params[1]) || (Config->StrictPasswords && len < 5)) { - notice_lang(Config->s_NickServ, u, MORE_OBSCURE_PASSWORD); + u->SendMessage(NickServ, MORE_OBSCURE_PASSWORD); return MOD_CONT; } else if (len > Config->PassLen) { - notice_lang(Config->s_NickServ, u, PASSWORD_TOO_LONG); + u->SendMessage(NickServ, PASSWORD_TOO_LONG); return MOD_CONT; } @@ -195,15 +195,15 @@ class CommandNSSASetPassword : public Command { // XXX //Alog() << Config->s_NickServ << ": Failed to encrypt password for " << nc->display << " (saset)"; - notice_lang(Config->s_NickServ, u, NICK_SASET_PASSWORD_FAILED, nc->display.c_str()); + u->SendMessage(NickServ, NICK_SASET_PASSWORD_FAILED, nc->display.c_str()); return MOD_CONT; } Anope::string tmp_pass; if (enc_decrypt(nc->pass, tmp_pass) == 1) - notice_lang(Config->s_NickServ, u, NICK_SASET_PASSWORD_CHANGED_TO, nc->display.c_str(), tmp_pass.c_str()); + u->SendMessage(NickServ, NICK_SASET_PASSWORD_CHANGED_TO, nc->display.c_str(), tmp_pass.c_str()); else - notice_lang(Config->s_NickServ, u, NICK_SASET_PASSWORD_CHANGED, nc->display.c_str()); + u->SendMessage(NickServ, NICK_SASET_PASSWORD_CHANGED, nc->display.c_str()); if (Config->WallSetpass) ircdproto->SendGlobops(NickServ, "\2%s\2 used SASET PASSWORD on \2%s\2", u->nick.c_str(), nc->display.c_str()); @@ -213,18 +213,18 @@ class CommandNSSASetPassword : public Command bool OnHelp(User *u, const Anope::string &) { - notice_help(Config->s_NickServ, u, NICK_HELP_SASET_PASSWORD); + u->SendMessage(NickServ, NICK_HELP_SASET_PASSWORD); return true; } void OnSyntaxError(User *u, const Anope::string &) { - syntax_error(Config->s_NickServ, u, "SASET", NICK_SASET_SYNTAX); + SyntaxError(NickServ, u, "SASET", NICK_SASET_SYNTAX); } void OnServHelp(User *u) { - notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_PASSWORD); + u->SendMessage(NickServ, NICK_HELP_CMD_SASET_PASSWORD); } }; |