mirror of
https://github.com/anope/anope.git
synced 2026-07-03 03:03:13 +02:00
Moved the language strings which are only used once
out of the core and into the modules that use them.
This commit is contained in:
+18
-13
@@ -34,12 +34,12 @@ class CommandHSSet : public Command
|
||||
rawhostmask = myStrGetTokenRemainder(rawhostmask, '@', 1); /* get the remaining string */
|
||||
if (rawhostmask.empty())
|
||||
{
|
||||
source.Reply(HOST_SET_SYNTAX, Config->s_HostServ.c_str());
|
||||
source.Reply(_("SET \002<nick>\002 \002<hostmask>\002."), Config->s_HostServ.c_str());
|
||||
return MOD_CONT;
|
||||
}
|
||||
if (vIdent.length() > Config->UserLen)
|
||||
{
|
||||
source.Reply(HOST_SET_IDENTTOOLONG, Config->UserLen);
|
||||
source.Reply(LanguageString::HOST_SET_IDENTTOOLONG, Config->UserLen);
|
||||
return MOD_CONT;
|
||||
}
|
||||
else
|
||||
@@ -47,13 +47,13 @@ class CommandHSSet : public Command
|
||||
for (Anope::string::iterator s = vIdent.begin(), s_end = vIdent.end(); s != s_end; ++s)
|
||||
if (!isvalidchar(*s))
|
||||
{
|
||||
source.Reply(HOST_SET_IDENT_ERROR);
|
||||
source.Reply(LanguageString::HOST_SET_IDENT_ERROR);
|
||||
return MOD_CONT;
|
||||
}
|
||||
}
|
||||
if (!ircd->vident)
|
||||
{
|
||||
source.Reply(HOST_NO_VIDENT);
|
||||
source.Reply(LanguageString::HOST_NO_VIDENT);
|
||||
return MOD_CONT;
|
||||
}
|
||||
}
|
||||
@@ -61,13 +61,13 @@ class CommandHSSet : public Command
|
||||
hostmask = rawhostmask;
|
||||
else
|
||||
{
|
||||
source.Reply(HOST_SET_TOOLONG, Config->HostLen);
|
||||
source.Reply(LanguageString::HOST_SET_TOOLONG, Config->HostLen);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!isValidHost(hostmask, 3))
|
||||
{
|
||||
source.Reply(HOST_SET_ERROR);
|
||||
source.Reply(LanguageString::HOST_SET_ERROR);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class CommandHSSet : public Command
|
||||
{
|
||||
if (na->HasFlag(NS_FORBIDDEN))
|
||||
{
|
||||
source.Reply(NICK_X_FORBIDDEN, nick.c_str());
|
||||
source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -85,29 +85,34 @@ class CommandHSSet : public Command
|
||||
na->hostinfo.SetVhost(vIdent, hostmask, u->nick);
|
||||
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
|
||||
if (!vIdent.empty())
|
||||
source.Reply(HOST_IDENT_SET, nick.c_str(), vIdent.c_str(), hostmask.c_str());
|
||||
source.Reply(_("vhost for \002%s\002 set to \002%s\002@\002%s\002."), nick.c_str(), vIdent.c_str(), hostmask.c_str());
|
||||
else
|
||||
source.Reply(HOST_SET, nick.c_str(), hostmask.c_str());
|
||||
source.Reply(_("vhost for \002%s\002 set to \002%s\002."), nick.c_str(), hostmask.c_str());
|
||||
}
|
||||
else
|
||||
source.Reply(HOST_NOREG, nick.c_str());
|
||||
source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
source.Reply(HOST_HELP_SET);
|
||||
source.Reply(_("Syntax: \002SET\002 \002<nick>\002 \002<hostmask>\002.\n"
|
||||
"Sets the vhost for the given nick to that of the given\n"
|
||||
"hostmask. If your IRCD supports vIdents, then using\n"
|
||||
"SET <nick> <ident>@<hostmask> set idents for users as \n"
|
||||
"well as vhosts."));
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(source, "SET", HOST_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", _("SET \002<nick>\002 \002<hostmask>\002."));
|
||||
}
|
||||
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
source.Reply(HOST_HELP_CMD_SET);
|
||||
source.Reply(_(" SET Set the vhost of another user"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user