2014-04-17 23:55:49 +02:00
|
|
|
# ngIRCd test suite
|
|
|
|
# WHO test
|
|
|
|
|
2014-04-17 23:57:38 +02:00
|
|
|
spawn telnet 127.0.0.1 6789
|
2008-02-17 01:00:12 +01:00
|
|
|
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 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick H :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "who 0\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick H :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "away :testing\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"306 nick"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "who *\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "join #channel\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"@* JOIN :#channel"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "who #channel\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "mode #channel +v nick\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"@* MODE #channel +v nick\r"
|
|
|
|
}
|
|
|
|
|
2011-12-30 14:52:48 +01:00
|
|
|
send "who #channel\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name"
|
|
|
|
}
|
|
|
|
|
2014-04-17 23:57:38 +02:00
|
|
|
send "who 127.0.0.*\r"
|
2008-02-17 01:00:12 +01:00
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "mode #channel -o nick\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"@* MODE #channel -o nick\r"
|
|
|
|
}
|
|
|
|
|
2011-12-30 14:52:48 +01:00
|
|
|
send "who #channel\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G+ :0 Real Name"
|
|
|
|
}
|
|
|
|
|
2008-02-17 01:00:12 +01:00
|
|
|
send "who ngircd.test.server\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "part #channel\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2015-03-14 11:13:50 +01:00
|
|
|
"@* PART #channel :"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "who Real?Name\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "oper TestOp 123\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"MODE nick :+o"
|
|
|
|
}
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"381 nick"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "who 0 o\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick G* :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "away\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"305 nick"
|
|
|
|
}
|
|
|
|
|
2014-04-17 23:57:38 +02:00
|
|
|
send "who ??7.*0*\r"
|
2008-02-17 01:00:12 +01:00
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "join #opers\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"@* JOIN :#opers"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "who #opers\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick #opers * * ngircd.test.server nick H*@ :0 Real Name"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "who Re*me\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "mode #opers -o nick\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"@* MODE #opers -o nick\r"
|
|
|
|
}
|
|
|
|
|
2011-12-30 14:52:48 +01:00
|
|
|
send "who #opers\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
":ngircd.test.server 352 nick #opers * * ngircd.test.server nick H* :0 Real Name"
|
|
|
|
}
|
|
|
|
|
2008-02-17 01:00:12 +01:00
|
|
|
send "who *.server\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "mode #opers +v nick\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"@* MODE #opers +v nick\r"
|
|
|
|
}
|
|
|
|
|
2011-12-30 14:52:48 +01:00
|
|
|
send "who #opers\r"
|
2008-02-17 01:00:12 +01:00
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2011-12-30 14:52:48 +01:00
|
|
|
":ngircd.test.server 352 nick #opers * * ngircd.test.server nick H*+ :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
send "mode #opers +s\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"@* MODE #opers +s\r"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "who n?c?\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2008-05-11 15:17:22 +02:00
|
|
|
":ngircd.test.server 352 nick \* * ngircd.test.server nick H* :0 Real Name"
|
2008-02-17 01:00:12 +01:00
|
|
|
}
|
2008-05-09 21:47:31 +02:00
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"315"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "who #SecretChannel\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"315"
|
|
|
|
}
|
2008-02-17 01:00:12 +01:00
|
|
|
|
|
|
|
send "quit\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"Connection closed"
|
|
|
|
}
|