Blob
- Date:
- Message:
- Implement RFC 2812 handling of "0" argument to JOIN The students in my software-engineering class are writing IRC clients in Java, and I'm running ngIRCd as a sandbox for them to play in. We noticed ngIRCd doesn't obey the "JOIN 0" command specified in RFC 2812: JOIN 0 ; Leave all currently joined channels. http://tools.ietf.org/html/rfc2812#section-3.2.1 I believe the following patch addresses this. Cheers! [fw@strlen.de: put it into a seperate function]
- Actions:
- History | Blame | Raw File
1 # $Id: channel-test.e,v 1.4 2008/02/05 13:31:51 fw Exp $3 spawn telnet localhost 67894 expect {5 timeout { exit 1 }6 "Connected"7 }9 send "nick nick\r"10 send "user user . . :User\r"11 expect {12 timeout { exit 1 }13 "376"14 }16 send "join #channel\r"17 expect {18 timeout { exit 1 }19 "@* JOIN :#channel"20 }21 expect {22 timeout { exit 1 }23 "366"24 }26 send "topic #channel :Test-Topic\r"27 expect {28 timeout { exit 1 }29 "@* TOPIC #channel :Test-Topic"30 }32 send "who #channel\r"33 expect {34 timeout { exit 1 }35 "352 nick #channel"36 }37 expect {38 timeout { exit 1 }39 "* nick H@ :0 User"40 }41 expect {42 timeout { exit 1 }43 "315 nick #channel"44 }46 send "names #channel\r"47 expect {48 timeout { exit 1 }49 "353 nick = #channel :@nick"50 }51 expect {52 timeout { exit 1 }53 "366 nick #channel"54 }56 send "list\r"57 expect {58 timeout { exit 1 }59 "322 nick #channel 1 :Test-Topic"60 }61 expect {62 timeout { exit 1 }63 "323 nick :End of LIST"64 }66 send "part #channel\r"67 expect {68 timeout { exit 1 }69 "@* PART #channel :nick"70 }72 send "join #channel\r"73 expect {74 timeout { exit 1 }75 "@* JOIN :#channel"76 }77 expect {78 timeout { exit 1 }79 "366"80 }82 send "join #channel2\r"83 expect {84 timeout { exit 1 }85 "@* JOIN :#channel2"86 }87 expect {88 timeout { exit 1 }89 "366"90 }92 send "join 0\r"93 expect {94 timeout { exit 1 }95 "@* PART #channel2 :nick"96 }97 expect {98 timeout { exit 1 }99 "@* PART #channel :nick"100 }102 send "quit\r"103 expect {104 timeout { exit 1 }105 "Connection closed"106 }108 # -eof-