1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 05:26:38 +02:00

Changed the language system to use gettext

This commit is contained in:
Adam
2010-09-26 02:33:01 -04:00
parent 05e6815d91
commit d646d455e2
239 changed files with 168730 additions and 90259 deletions
+13 -13
View File
@@ -31,12 +31,12 @@ class CommandHSSetAll : public Command
if (!(na = findnick(nick)))
{
notice_lang(Config->s_HostServ, u, HOST_NOREG, nick.c_str());
u->SendMessage(HostServ, HOST_NOREG, nick.c_str());
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
notice_lang(Config->s_HostServ, u, NICK_X_FORBIDDEN, nick.c_str());
u->SendMessage(HostServ, NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
@@ -46,12 +46,12 @@ class CommandHSSetAll : public Command
rawhostmask = myStrGetTokenRemainder(rawhostmask, '@', 1); /* get the remaining string */
if (rawhostmask.empty())
{
notice_lang(Config->s_HostServ, u, HOST_SETALL_SYNTAX, Config->s_HostServ.c_str());
u->SendMessage(HostServ, HOST_SETALL_SYNTAX, Config->s_HostServ.c_str());
return MOD_CONT;
}
if (vIdent.length() > Config->UserLen)
{
notice_lang(Config->s_HostServ, u, HOST_SET_IDENTTOOLONG, Config->UserLen);
u->SendMessage(HostServ, HOST_SET_IDENTTOOLONG, Config->UserLen);
return MOD_CONT;
}
else
@@ -59,13 +59,13 @@ class CommandHSSetAll : public Command
for (Anope::string::iterator s = vIdent.begin(), s_end = vIdent.end(); s != s_end; ++s)
if (!isvalidchar(*s))
{
notice_lang(Config->s_HostServ, u, HOST_SET_IDENT_ERROR);
u->SendMessage(HostServ, HOST_SET_IDENT_ERROR);
return MOD_CONT;
}
}
if (!ircd->vident)
{
notice_lang(Config->s_HostServ, u, HOST_NO_VIDENT);
u->SendMessage(HostServ, HOST_NO_VIDENT);
return MOD_CONT;
}
}
@@ -74,13 +74,13 @@ class CommandHSSetAll : public Command
hostmask = rawhostmask;
else
{
notice_lang(Config->s_HostServ, u, HOST_SET_TOOLONG, Config->HostLen);
u->SendMessage(HostServ, HOST_SET_TOOLONG, Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
notice_lang(Config->s_HostServ, u, HOST_SET_ERROR);
u->SendMessage(HostServ, HOST_SET_ERROR);
return MOD_CONT;
}
@@ -92,26 +92,26 @@ class CommandHSSetAll : public Command
HostServSyncVhosts(na);
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
if (!vIdent.empty())
notice_lang(Config->s_HostServ, u, HOST_IDENT_SETALL, nick.c_str(), vIdent.c_str(), hostmask.c_str());
u->SendMessage(HostServ, HOST_IDENT_SETALL, nick.c_str(), vIdent.c_str(), hostmask.c_str());
else
notice_lang(Config->s_HostServ, u, HOST_SETALL, nick.c_str(), hostmask.c_str());
u->SendMessage(HostServ, HOST_SETALL, nick.c_str(), hostmask.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_HostServ, u, HOST_HELP_SETALL);
u->SendMessage(HostServ, HOST_HELP_SETALL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_HostServ, u, "SETALL", HOST_SETALL_SYNTAX);
SyntaxError(HostServ, u, "SETALL", HOST_SETALL_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_HostServ, u, HOST_HELP_CMD_SETALL);
u->SendMessage(HostServ, HOST_HELP_CMD_SETALL);
}
};