Ignore command case (non-strict)

This commit is contained in:
Les De Ridder 2020-10-14 05:59:33 +02:00
parent 66175b4168
commit 3c06c1b738
3 changed files with 9 additions and 3 deletions

View File

@ -158,7 +158,10 @@ class Connection
continue;
}
//TODO: If RFC-strictness is off, ignore command case
version (BasicFixes)
{
message.command = message.command.map!toUpper.to!string;
}
//NOTE: The RFCs don't specify what 'being idle' means
// We assume that it's sending any message that isn't a PING/PONG.

View File

@ -229,8 +229,8 @@ class Server
{
foreach (c; connections.filter!(c => c.visibleTo(origin))
.filter!(c => !operatorsOnly || c.isOperator)
.filter!(c => [c.hostname, c.servername, c.realname,
c.nick].any!(n => wildcardMatch(n, mask))))
.filter!(c => [c.hostname, c.servername, c.realname, c.nick]
.any!(n => wildcardMatch(n, mask))))
{
//TODO: Don't leak secret/private channels if RFC-strictness is off (the RFCs don't seem to say anything about it?)
auto channelName = c.channels.empty ? "*" : c.channels.array[0].name;

View File

@ -11,6 +11,9 @@ module ircd.versions;
(* NotStrict: enabled when any versions are enabled that disable RFC-strictness, i.e. any of the above)
+/
//TODO: Implement 'SupportTLS'
//TODO: Implement 'MaxNickLengthConfigurable'
version (Modern)
{
version = SupportTLS;