Send ERR_NOSUCHNICK on MODE with invalid target (non-strict)
This commit is contained in:
parent
a59fdc67ce
commit
49f8cfa3ce
|
@ -224,6 +224,7 @@ class Channel
|
||||||
|
|
||||||
modes ~= mode;
|
modes ~= mode;
|
||||||
|
|
||||||
|
//NOTE: The RFCs don't specify that the invite list should be cleared on +i
|
||||||
version (BasicFixes)
|
version (BasicFixes)
|
||||||
{
|
{
|
||||||
if (mode == 'i')
|
if (mode == 'i')
|
||||||
|
|
|
@ -165,6 +165,7 @@ class Connection
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NOTE: The RFCs don't specify whether commands are case-sensitive
|
||||||
version (BasicFixes)
|
version (BasicFixes)
|
||||||
{
|
{
|
||||||
message.command = message.command.map!toUpper.to!string;
|
message.command = message.command.map!toUpper.to!string;
|
||||||
|
@ -996,7 +997,11 @@ class Connection
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//TODO: If RFC-strictness is off, send an error
|
//NOTE: The RFCs don't allow ERR_NOSUCHNICK as a reponse to MODE
|
||||||
|
version (BasicFixes)
|
||||||
|
{
|
||||||
|
sendErrNoSuchNick(target);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1438,7 +1443,6 @@ class Connection
|
||||||
void onIncorrectPassword()
|
void onIncorrectPassword()
|
||||||
{
|
{
|
||||||
//NOTE: The RFCs don't allow ERR_PASSWDMISMATCH as a response to NICK/USER
|
//NOTE: The RFCs don't allow ERR_PASSWDMISMATCH as a response to NICK/USER
|
||||||
|
|
||||||
version (BasicFixes)
|
version (BasicFixes)
|
||||||
{
|
{
|
||||||
send(Message(_server.name, "464", [nick, "Password incorrect"], true));
|
send(Message(_server.name, "464", [nick, "Password incorrect"], true));
|
||||||
|
|
Loading…
Reference in New Issue