mirror of
https://github.com/anope/anope.git
synced 2026-07-04 16:33:13 +02:00
Changed the language system to use gettext
This commit is contained in:
@@ -34,15 +34,15 @@ class CommandNSGetPass : public Command
|
||||
Log(LOG_ADMIN, u, this) << "for " << nr->nick;
|
||||
if (Config->WallGetpass)
|
||||
ircdproto->SendGlobops(NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick.c_str(), nick.c_str());
|
||||
notice_lang(Config->s_NickServ, u, NICK_GETPASS_PASSCODE_IS, nick.c_str(), nr->passcode.c_str());
|
||||
u->SendMessage(NickServ, NICK_GETPASS_PASSCODE_IS, nick.c_str(), nr->passcode.c_str());
|
||||
}
|
||||
else
|
||||
notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
|
||||
u->SendMessage(NickServ, NICK_X_NOT_REGISTERED, 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 (Config->NSSecureAdmins && na->nc->IsServicesOper())
|
||||
notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
|
||||
u->SendMessage(NickServ, ACCESS_DENIED);
|
||||
else
|
||||
{
|
||||
if (enc_decrypt(na->nc->pass, tmp_pass) == 1)
|
||||
@@ -50,28 +50,28 @@ class CommandNSGetPass : public Command
|
||||
Log(LOG_ADMIN, u, this) << "for " << nick;
|
||||
if (Config->WallGetpass)
|
||||
ircdproto->SendGlobops(NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick.c_str(), nick.c_str());
|
||||
notice_lang(Config->s_NickServ, u, NICK_GETPASS_PASSWORD_IS, nick.c_str(), tmp_pass.c_str());
|
||||
u->SendMessage(NickServ, NICK_GETPASS_PASSWORD_IS, nick.c_str(), tmp_pass.c_str());
|
||||
}
|
||||
else
|
||||
notice_lang(Config->s_NickServ, u, NICK_GETPASS_UNAVAILABLE);
|
||||
u->SendMessage(NickServ, NICK_GETPASS_UNAVAILABLE);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
{
|
||||
notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_GETPASS);
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP_GETPASS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
{
|
||||
syntax_error(Config->s_NickServ, u, "GETPASS", NICK_GETPASS_SYNTAX);
|
||||
SyntaxError(NickServ, u, "GETPASS", NICK_GETPASS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
{
|
||||
notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_GETPASS);
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_GETPASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user