On 2008-02-08 at 20:27 +0100, Florian Westphal wrote:
Actually i am quite surprised this didn't came up before (or that i never noticed this... ).
Chalk it up to 50 students beating on ngIRCd while trying to implement RFC-compliant clients more or less from scratch. :)
In addition to the "H" flag issue, I think there may be some failures handling wildcards in the mask of a WHO command. I'm including a proposed test script that exercises various possibilities suggested by the description here:
http://tools.ietf.org/html/rfc2812#section-3.6.1
These tests seem to work on other IRC servers I've tried.
Dana
diff -Nau src/testsuite/who-away-test.e src/testsuite/who-away-test.e --- src/testsuite/who-away-test.e 2008-02-08 12:38:12.000000000 -0800 +++ src/testsuite/who-away-test.e 2008-02-08 12:38:12.000000000 -0800 @@ -0,0 +1,100 @@ +# $Id$ + +spawn telnet localhost 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :Real Name\r" +expect { + timeout { exit 1 } + "376" +} + +send "who\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick H :0 Real Name" +} + +send "who 0\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick H :0 Real Name" +} + +send "who *\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick H :0 Real Name" +} + +send "away :testing\r" +expect { + timeout { exit 1 } + "306 nick" +} + +send "who localhost\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick G :0 Real Name" +} + +send "who ngircd.test.server\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick G :0 Real Name" +} + +send "who Real?Name\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick G :0 Real Name" +} + +send "who nick\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick G :0 Real Name" +} + +send "away\r" +expect { + timeout { exit 1 } + "305 nick" +} + +send "who *cal*ho??\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick H :0 Real Name" +} + +send "who *.server\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick H :0 Real Name" +} + +send "who Real*me\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick H :0 Real Name" +} + +send "who n?c?\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick H :0 Real Name" +} + +send "quit\r" +expect { + timeout { exit 1 } + "Connection closed" +} + +# -eof-