mirror of
https://github.com/anope/anope.git
synced 2026-07-05 19:23:12 +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:
@@ -27,7 +27,7 @@ class CommandNSSetHide : public Command
|
||||
throw CoreException("NULL na in CommandNSSetHide");
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
LanguageString onmsg, offmsg;
|
||||
Anope::string onmsg, offmsg;
|
||||
NickCoreFlag flag;
|
||||
|
||||
Anope::string param = params[1];
|
||||
@@ -36,26 +36,26 @@ class CommandNSSetHide : public Command
|
||||
if (param.equals_ci("EMAIL"))
|
||||
{
|
||||
flag = NI_HIDE_EMAIL;
|
||||
onmsg = NICK_SASET_HIDE_EMAIL_ON;
|
||||
offmsg = NICK_SASET_HIDE_EMAIL_OFF;
|
||||
onmsg = _("The E-mail address of \002%s\002 will now be hidden from %s INFO displays.");
|
||||
offmsg = _("The E-mail address of \002%s\002 will now be shown in %s INFO displays.");
|
||||
}
|
||||
else if (param.equals_ci("USERMASK"))
|
||||
{
|
||||
flag = NI_HIDE_MASK;
|
||||
onmsg = NICK_SASET_HIDE_MASK_ON;
|
||||
offmsg = NICK_SASET_HIDE_MASK_OFF;
|
||||
onmsg = _("The last seen user@host mask of \002%s\002 will now be hidden from %s INFO displays.");
|
||||
offmsg = _("The last seen user@host mask of \002%s\002 will now be shown in %s INFO displays.");
|
||||
}
|
||||
else if (param.equals_ci("STATUS"))
|
||||
{
|
||||
flag = NI_HIDE_STATUS;
|
||||
onmsg = NICK_SASET_HIDE_STATUS_ON;
|
||||
offmsg = NICK_SASET_HIDE_STATUS_OFF;
|
||||
onmsg = _("The services access status of \002%s\002 will now be hidden from %s INFO displays.");
|
||||
offmsg = _("The services access status of \002%s\002 will now be shown in %s INFO displays.");
|
||||
}
|
||||
else if (param.equals_ci("QUIT"))
|
||||
{
|
||||
flag = NI_HIDE_QUIT;
|
||||
onmsg = NICK_SASET_HIDE_QUIT_ON;
|
||||
offmsg = NICK_SASET_HIDE_QUIT_OFF;
|
||||
onmsg = _("The last quit message of \002%s\002 will now be hidden from %s INFO displays.");
|
||||
offmsg = _("The last quit message of \002%s\002 will now be shown in %s INFO displays.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -66,12 +66,12 @@ class CommandNSSetHide : public Command
|
||||
if (arg.equals_ci("ON"))
|
||||
{
|
||||
nc->SetFlag(flag);
|
||||
source.Reply(onmsg, nc->display.c_str(), Config->s_NickServ.c_str());
|
||||
source.Reply(onmsg.c_str(), nc->display.c_str(), Config->s_NickServ.c_str());
|
||||
}
|
||||
else if (arg.equals_ci("OFF"))
|
||||
{
|
||||
nc->UnsetFlag(flag);
|
||||
source.Reply(offmsg, nc->display.c_str(), Config->s_NickServ.c_str());
|
||||
source.Reply(offmsg.c_str(), nc->display.c_str(), Config->s_NickServ.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, "HIDE");
|
||||
@@ -81,18 +81,26 @@ class CommandNSSetHide : public Command
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
source.Reply(NICK_HELP_SET_HIDE);
|
||||
source.Reply(_("Syntax: \002SET HIDE {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}\002\n"
|
||||
" \n"
|
||||
"Allows you to prevent certain pieces of information from\n"
|
||||
"being displayed when someone does a %S \002INFO\002 on your\n"
|
||||
"nick. You can hide your E-mail address (\002EMAIL\002), last seen\n"
|
||||
"user@host mask (\002USERMASK\002), your services access status\n"
|
||||
"(\002STATUS\002) and last quit message (\002QUIT\002).\n"
|
||||
"The second parameter specifies whether the information should\n"
|
||||
"be displayed (\002OFF\002) or hidden (\002ON\002)."));
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(source, "SET HIDE", NICK_SET_HIDE_SYNTAX);
|
||||
SyntaxError(source, "SET HIDE", _("SET HIDE {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}"));
|
||||
}
|
||||
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
source.Reply(NICK_HELP_CMD_SET_HIDE);
|
||||
source.Reply(_(" HIDE Hide certain pieces of nickname information"));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -105,18 +113,26 @@ class CommandNSSASetHide : public CommandNSSetHide
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
source.Reply(NICK_HELP_SASET_HIDE);
|
||||
source.Reply(_("Syntax: \002SASET \037nickname\037 HIDE {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}\002\n"
|
||||
" \n"
|
||||
"Allows you to prevent certain pieces of information from\n"
|
||||
"being displayed when someone does a %S \002INFO\002 on the\n"
|
||||
"nick. You can hide the E-mail address (\002EMAIL\002), last seen\n"
|
||||
"user@host mask (\002USERMASK\002), the services access status\n"
|
||||
"(\002STATUS\002) and last quit message (\002QUIT\002).\n"
|
||||
"The second parameter specifies whether the information should\n"
|
||||
"be displayed (\002OFF\002) or hidden (\002ON\002)."));
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(source, "SASET HIDE", NICK_SASET_HIDE_SYNTAX);
|
||||
SyntaxError(source, "SASET HIDE", _("SASET NICK_SASET_HIDE_SYNTAX37nicknameNICK_SASET_HIDE_SYNTAX37 HIDE {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}"));
|
||||
}
|
||||
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
source.Reply(NICK_HELP_CMD_SET_HIDE);
|
||||
source.Reply(_(" HIDE Hide certain pieces of nickname information"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user