Handle plain nicks on +b/+e/+I and send error on invalid mask (non-strict)
This commit is contained in:
parent
b5616c4a0b
commit
cd7613ed70
|
@ -1198,7 +1198,7 @@ class Connection
|
|||
processedParameters ~= memberNick;
|
||||
}
|
||||
break;
|
||||
case 'b': //TODO: Implement bans
|
||||
case 'b':
|
||||
case 'e': //TODO: Implement ban exceptions
|
||||
case 'I': //TODO: Implement invite lists
|
||||
if (i + 1 == message.parameters.length)
|
||||
|
@ -1207,12 +1207,27 @@ class Connection
|
|||
break Lforeach;
|
||||
}
|
||||
auto mask = message.parameters[++i];
|
||||
//TODO: If RFC-strictness is off, interpret '<nick>' as '<nick>!*@*'
|
||||
if (!Server.isValidUserMask(mask))
|
||||
{
|
||||
//TODO: If RFC-strictness is off, send an error
|
||||
//NOTE: The RFCs don't specify whether nicks are valid masks
|
||||
//NOTE: The RFCs don't allow an error reply on an invalid user mask
|
||||
version (BasicFixes)
|
||||
{
|
||||
if (Server.isValidNick(mask))
|
||||
{
|
||||
mask ~= "!*@*";
|
||||
}
|
||||
else
|
||||
{
|
||||
sendMalformedMessageError(message.command, "Invalid user mask: " ~ mask);
|
||||
break Lforeach;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
break Lforeach;
|
||||
}
|
||||
}
|
||||
|
||||
bool success;
|
||||
if (add)
|
||||
|
|
Loading…
Reference in New Issue