mirror of
https://github.com/anope/anope.git
synced 2026-07-03 10:13: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:
@@ -35,14 +35,14 @@ class CommandNSSetKill : public Command
|
||||
nc->SetFlag(NI_KILLPROTECT);
|
||||
nc->UnsetFlag(NI_KILL_QUICK);
|
||||
nc->UnsetFlag(NI_KILL_IMMED);
|
||||
source.Reply(NICK_SASET_KILL_ON, nc->display.c_str());
|
||||
source.Reply(_("Protection is now \002\002 for \002%s\002."), nc->display.c_str());
|
||||
}
|
||||
else if (param.equals_ci("QUICK"))
|
||||
{
|
||||
nc->SetFlag(NI_KILLPROTECT);
|
||||
nc->SetFlag(NI_KILL_QUICK);
|
||||
nc->UnsetFlag(NI_KILL_IMMED);
|
||||
source.Reply(NICK_SASET_KILL_QUICK, nc->display.c_str());
|
||||
source.Reply(_("Protection is now \002\002 for \002%s\002, with a reduced delay."), nc->display.c_str());
|
||||
}
|
||||
else if (param.equals_ci("IMMED"))
|
||||
{
|
||||
@@ -51,17 +51,17 @@ class CommandNSSetKill : public Command
|
||||
nc->SetFlag(NI_KILLPROTECT);
|
||||
nc->SetFlag(NI_KILL_IMMED);
|
||||
nc->UnsetFlag(NI_KILL_QUICK);
|
||||
source.Reply(NICK_SASET_KILL_IMMED, nc->display.c_str());
|
||||
source.Reply(_("Protection is now \002\002 for \002%s\002, with no delay."), nc->display.c_str());
|
||||
}
|
||||
else
|
||||
source.Reply(NICK_SET_KILL_IMMED_DISABLED);
|
||||
source.Reply(_("The \002IMMED\002 option is not available on this network."));
|
||||
}
|
||||
else if (param.equals_ci("OFF"))
|
||||
{
|
||||
nc->UnsetFlag(NI_KILLPROTECT);
|
||||
nc->UnsetFlag(NI_KILL_QUICK);
|
||||
nc->UnsetFlag(NI_KILL_IMMED);
|
||||
source.Reply(NICK_SASET_KILL_OFF, nc->display.c_str());
|
||||
source.Reply(_("Protection is now \002\002 for \002%s\002."), nc->display.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, "KILL");
|
||||
@@ -71,18 +71,31 @@ class CommandNSSetKill : public Command
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
source.Reply(NICK_HELP_SET_KILL);
|
||||
source.Reply(_("Syntax: \002SET KILL {ON | QUICK | IMMED | OFF}\002\n"
|
||||
" \n"
|
||||
"Turns the automatic protection option for your nick\n"
|
||||
"on or off. With protection on, if another user\n"
|
||||
"tries to take your nick, they will be given one minute to\n"
|
||||
"change to another nick, after which %S will forcibly change\n"
|
||||
"their nick.\n"
|
||||
" \n"
|
||||
"If you select \002QUICK\002, the user will be given only 20 seconds\n"
|
||||
"to change nicks instead of the usual 60. If you select\n"
|
||||
"\002IMMED\002, user's nick will be changed immediately \037without\037 being\n"
|
||||
"warned first or given a chance to change their nick; please\n"
|
||||
"do not use this option unless necessary. Also, your\n"
|
||||
"network's administrators may have disabled this option."));
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(source, "SET KILL", Config->NSAllowKillImmed ? NICK_SET_KILL_IMMED_SYNTAX : NICK_SET_KILL_SYNTAX);
|
||||
SyntaxError(source, "SET KILL", Config->NSAllowKillImmed ? _("SET KILL {ON | QUICK | IMMED | OFF}") : _("SET KILL {ON | QUICK | OFF}"));
|
||||
}
|
||||
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
source.Reply(NICK_HELP_CMD_SET_KILL);
|
||||
source.Reply(_(" KILL Turn protection on or off"));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -95,18 +108,31 @@ class CommandNSSASetKill : public CommandNSSetKill
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
source.Reply(NICK_HELP_SASET_KILL);
|
||||
source.Reply(_("Syntax: \002SASET \037nickname\037 KILL {ON | QUICK | IMMED | OFF}\002\n"
|
||||
" \n"
|
||||
"Turns the automatic protection option for the nick\n"
|
||||
"on or off. With protection on, if another user\n"
|
||||
"tries to take the nick, they will be given one minute to\n"
|
||||
"change to another nick, after which %S will forcibly change\n"
|
||||
"their nick.\n"
|
||||
" \n"
|
||||
"If you select \002QUICK\002, the user will be given only 20 seconds\n"
|
||||
"to change nicks instead of the usual 60. If you select\n"
|
||||
"\002IMMED\002, the user's nick will be changed immediately \037without\037 being\n"
|
||||
"warned first or given a chance to change their nick; please\n"
|
||||
"do not use this option unless necessary. Also, your\n"
|
||||
"network's administrators may have disabled this option."));
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(source, "SASET KILL", Config->NSAllowKillImmed ? NICK_SASET_KILL_IMMED_SYNTAX : NICK_SASET_KILL_SYNTAX);
|
||||
SyntaxError(source, "SASET KILL", Config->NSAllowKillImmed ? _("SASET \037nickname\037 KILL {ON | QUICK | IMMED | OFF}") : _("SASET \037nickname\037 KILL {ON | QUICK | OFF}"));
|
||||
}
|
||||
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
source.Reply(NICK_HELP_CMD_SET_KILL);
|
||||
source.Reply(_(" KILL Turn protection on or off"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user