mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Allow specifying multiple masks when adding an X-line.
The only exemptions for this are RLINE (a real name might contains commas) and SVSHOLD (sent by services only). Closes #1972.
This commit is contained in:
parent
513309fc68
commit
befecafad3
@ -680,7 +680,7 @@ Changes the real name of the user to the specified real name.
|
||||
Changes the ident of the user to the specified ident.
|
||||
">
|
||||
|
||||
<helpop key="shun" title="/SHUN <nick!user@host> [<duration> :<reason>]" value="
|
||||
<helpop key="shun" title="/SHUN <nick!user@host>[,<nick!user@host>]+ [<duration> :<reason>]" value="
|
||||
Sets or removes a shun (global server-side ignore) on a nick!user@host mask.
|
||||
You must specify all three parameters to add a shun, and one parameter
|
||||
to remove a shun (just the nick!user@host).
|
||||
@ -753,7 +753,7 @@ Unloads a module from all linked servers.
|
||||
Unloads and reloads a module on all linked servers.
|
||||
">
|
||||
|
||||
<helpop key="kline" title="/KLINE <user@host> [<duration> :<reason>]" value="
|
||||
<helpop key="kline" title="/KLINE <user@host>[,<user@host>]+ [<duration> :<reason>]" value="
|
||||
Sets or removes a K-line (local user@host based ban) on a user@host mask.
|
||||
You must specify all three parameters to add a ban, and one parameter
|
||||
to remove a ban (just the user@host).
|
||||
@ -763,7 +763,7 @@ The duration may be specified in seconds, or in the format
|
||||
five minutes and six seconds. All fields in this format are optional.
|
||||
">
|
||||
|
||||
<helpop key="zline" title="/ZLINE <ipmask> [<duration> :<reason>]" value="
|
||||
<helpop key="zline" title="/ZLINE <ipmask>[,<ipmask>]+ [<duration> :<reason>]" value="
|
||||
Sets or removes a Z-line (global IP based ban) on an IP mask.
|
||||
You must specify all three parameters to add a ban, and one parameter
|
||||
to remove a ban (just the ipmask).
|
||||
@ -773,7 +773,7 @@ The duration may be specified in seconds, or in the format
|
||||
five minutes and six seconds. All fields in this format are optional.
|
||||
">
|
||||
|
||||
<helpop key="qline" title="/QLINE <nickmask> [<duration> :<reason>]" value="
|
||||
<helpop key="qline" title="/QLINE <nickmask>[,<nickmask>]+ [<duration> :<reason>]" value="
|
||||
Sets or removes a Q-line (global nick based ban) on a nick mask.
|
||||
You must specify all three parameters to add a ban, and one parameter
|
||||
to remove a ban (just the nickmask).
|
||||
@ -783,7 +783,7 @@ The duration may be specified in seconds, or in the format
|
||||
five minutes and six seconds. All fields in this format are optional.
|
||||
">
|
||||
|
||||
<helpop key="gline" title="/GLINE <user@host> [<duration> :<reason>]" value="
|
||||
<helpop key="gline" title="/GLINE <user@host>[,<user@host>]+ [<duration> :<reason>]" value="
|
||||
Sets or removes a G-line (global user@host based ban) on a user@host mask.
|
||||
You must specify all three parameters to add a ban, and one
|
||||
parameter to remove a ban (just the user@host).
|
||||
@ -793,7 +793,7 @@ The duration may be specified in seconds, or in the format
|
||||
five minutes and six seconds. All fields in this format are optional.
|
||||
">
|
||||
|
||||
<helpop key="eline" title="/ELINE <user@host> [<duration> :<reason>]" value="
|
||||
<helpop key="eline" title="/ELINE <user@host>[,<user@host>]+ [<duration> :<reason>]" value="
|
||||
Sets or removes a E-line (global user@host ban exception) on a user@host mask.
|
||||
You must specify at least 3 parameters to add an exception, and one
|
||||
parameter to remove an exception (just the user@host).
|
||||
|
@ -33,15 +33,17 @@ CommandEline::CommandEline(Module* parent)
|
||||
: Command(parent, "ELINE", 1, 3)
|
||||
{
|
||||
flags_needed = 'o';
|
||||
syntax = "<user@host> [<duration> :<reason>]";
|
||||
syntax = "<user@host>[,<user@host>]+ [<duration> :<reason>]";
|
||||
}
|
||||
|
||||
/** Handle /ELINE
|
||||
*/
|
||||
CmdResult CommandEline::Handle(User* user, const Params& parameters)
|
||||
{
|
||||
std::string target = parameters[0];
|
||||
if (CommandParser::LoopCall(user, this, parameters, 0))
|
||||
return CMD_SUCCESS;
|
||||
|
||||
std::string target = parameters[0];
|
||||
if (parameters.size() >= 3)
|
||||
{
|
||||
IdentHostPair ih;
|
||||
|
@ -34,15 +34,17 @@ CommandGline::CommandGline(Module* parent)
|
||||
: Command(parent, "GLINE", 1, 3)
|
||||
{
|
||||
flags_needed = 'o';
|
||||
syntax = "<user@host> [<duration> :<reason>]";
|
||||
syntax = "<user@host>[,<user@host>]+ [<duration> :<reason>]";
|
||||
}
|
||||
|
||||
/** Handle /GLINE
|
||||
*/
|
||||
CmdResult CommandGline::Handle(User* user, const Params& parameters)
|
||||
{
|
||||
std::string target = parameters[0];
|
||||
if (CommandParser::LoopCall(user, this, parameters, 0))
|
||||
return CMD_SUCCESS;
|
||||
|
||||
std::string target = parameters[0];
|
||||
if (parameters.size() >= 3)
|
||||
{
|
||||
IdentHostPair ih;
|
||||
|
@ -34,15 +34,17 @@ CommandKline::CommandKline(Module* parent)
|
||||
: Command(parent, "KLINE", 1, 3)
|
||||
{
|
||||
flags_needed = 'o';
|
||||
syntax = "<user@host> [<duration> :<reason>]";
|
||||
syntax = "<user@host>[,<user@host>]+ [<duration> :<reason>]";
|
||||
}
|
||||
|
||||
/** Handle /KLINE
|
||||
*/
|
||||
CmdResult CommandKline::Handle(User* user, const Params& parameters)
|
||||
{
|
||||
std::string target = parameters[0];
|
||||
if (CommandParser::LoopCall(user, this, parameters, 0))
|
||||
return CMD_SUCCESS;
|
||||
|
||||
std::string target = parameters[0];
|
||||
if (parameters.size() >= 3)
|
||||
{
|
||||
IdentHostPair ih;
|
||||
|
@ -35,11 +35,14 @@ CommandQline::CommandQline(Module* parent)
|
||||
: Command(parent, "QLINE", 1, 3)
|
||||
{
|
||||
flags_needed = 'o';
|
||||
syntax = "<nickmask> [<duration> :<reason>]";
|
||||
syntax = "<nickmask>[,<nickmask>]+ [<duration> :<reason>]";
|
||||
}
|
||||
|
||||
CmdResult CommandQline::Handle(User* user, const Params& parameters)
|
||||
{
|
||||
if (CommandParser::LoopCall(user, this, parameters, 0))
|
||||
return CMD_SUCCESS;
|
||||
|
||||
if (parameters.size() >= 3)
|
||||
{
|
||||
NickMatcher matcher;
|
||||
|
@ -35,13 +35,15 @@ CommandZline::CommandZline(Module* parent)
|
||||
: Command(parent, "ZLINE", 1, 3)
|
||||
{
|
||||
flags_needed = 'o';
|
||||
syntax = "<ipmask> [<duration> :<reason>]";
|
||||
syntax = "<ipmask>[,<ipmask>]+ [<duration> :<reason>]";
|
||||
}
|
||||
|
||||
CmdResult CommandZline::Handle(User* user, const Params& parameters)
|
||||
{
|
||||
std::string target = parameters[0];
|
||||
if (CommandParser::LoopCall(user, this, parameters, 0))
|
||||
return CMD_SUCCESS;
|
||||
|
||||
std::string target = parameters[0];
|
||||
if (parameters.size() >= 3)
|
||||
{
|
||||
if (target.find('!') != std::string::npos)
|
||||
|
@ -62,16 +62,17 @@ class CommandShun : public Command
|
||||
CommandShun(Module* Creator) : Command(Creator, "SHUN", 1, 3)
|
||||
{
|
||||
flags_needed = 'o';
|
||||
syntax = "<nick!user@host> [<duration> :<reason>]";
|
||||
syntax = "<nick!user@host>[,<nick!user@host>]+ [<duration> :<reason>]";
|
||||
}
|
||||
|
||||
CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE
|
||||
{
|
||||
/* syntax: SHUN nick!user@host time :reason goes here */
|
||||
/* 'time' is a human-readable timestring, like 2d3h2s. */
|
||||
if (CommandParser::LoopCall(user, this, parameters, 0))
|
||||
return CMD_SUCCESS;
|
||||
|
||||
std::string target = parameters[0];
|
||||
|
||||
User *find = ServerInstance->FindNick(target);
|
||||
if ((find) && (find->registered == REG_ALL))
|
||||
target = "*!" + find->GetBanIdent() + "@" + find->GetIPString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user