1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-07-07 04:12:50 +00:00

PRIVMSG/NOTICE: handle nick!user@host masks case-insensitive

And enhance our test suite to check this a little bit better :-)
This commit is contained in:
Alexander Barton 2012-01-21 13:21:36 +01:00
parent c1656256df
commit 39412d6486
2 changed files with 5 additions and 5 deletions

View File

@ -440,8 +440,8 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
Client_Type(cl) != CLIENT_SERVICE) Client_Type(cl) != CLIENT_SERVICE)
continue; continue;
if (nick != NULL && host != NULL) { if (nick != NULL && host != NULL) {
if (strcmp(nick, Client_ID(cl)) == 0 && if (strcasecmp(nick, Client_ID(cl)) == 0 &&
strcmp(user, Client_User(cl)) == 0 && strcasecmp(user, Client_User(cl)) == 0 &&
strcasecmp(host, Client_HostnameCloaked(cl)) == 0) strcasecmp(host, Client_HostnameCloaked(cl)) == 0)
break; break;
else else

View File

@ -35,7 +35,7 @@ expect {
"@* PRIVMSG nick :test\r*@* PRIVMSG nick :test" "@* PRIVMSG nick :test\r*@* PRIVMSG nick :test"
} }
send "privmsg nick,#testChannel,nick :test\r" send "privmsg Nick,#testChannel,nick :test\r"
expect { expect {
timeout { exit 1 } timeout { exit 1 }
"@* PRIVMSG nick :test\r*401*@* PRIVMSG nick :test" "@* PRIVMSG nick :test\r*401*@* PRIVMSG nick :test"
@ -47,7 +47,7 @@ expect {
"401" "401"
} }
send "privmsg ~user@ngircd.test.server :test\r" send "privmsg ~UsEr@ngIRCd.Test.Server :test\r"
expect { expect {
timeout { exit 1 } timeout { exit 1 }
"@* PRIVMSG nick :test" "@* PRIVMSG nick :test"
@ -65,7 +65,7 @@ expect {
# "@* PRIVMSG nick :test" # "@* PRIVMSG nick :test"
#} #}
# #
#send "privmsg nick!~user@localhost :test\r" #send "privmsg Nick!~User@LocalHost :test\r"
#expect { #expect {
# timeout { exit 1 } # timeout { exit 1 }
# "@* PRIVMSG nick :test" # "@* PRIVMSG nick :test"