This commit is contained in:
Neale Pickett 2008-03-06 16:51:35 -07:00
parent 4d9ed389a2
commit 36ef378852
2 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,6 @@ let modes = "l"
let dbg msg a = prerr_endline msg; a
let by_file_descr = Hashtbl.create 25
let by_nick = Hashtbl.create 25
let error num args text =
@ -24,7 +23,6 @@ let error num args text =
let close cli ues g fd =
Hashtbl.remove by_nick !(cli.nick);
Hashtbl.remove by_file_descr fd;
Unix.close fd;
Unixqueue.remove_resource ues g (Unixqueue.Wait_in fd);
try
@ -136,7 +134,8 @@ let handle_command cli iobuf cmd =
| (None, "WALLOPS", [], Some text) ->
()
| (None, "ISON", nicks, None) ->
()
let ison = List.filter (Hashtbl.mem by_nick) nicks in
reply cli "303" (String.concat " " ison)
| (_, name, _, _) ->
reply cli "421" ~args:[name] "Unknown or misconstructed command"

View File

@ -65,6 +65,10 @@ let regression_tests =
Recv ":testserver.test PONG testserver.test :snot\r\n";
Send "PING :snot\r\n";
Recv ":testserver.test PONG testserver.test :snot\r\n";
Send "ISON nick otherguy\r\n";
Recv ":testserver.test 303 nick :nick\r\n";
Send "ISON otherguy thirdguy\r\n";
Recv ":testserver.test 303 nick :\r\n";
]));
]