# HG changeset patch
# User unc0rr
# Date 1209910907 0
# Node ID d4e5d8cbe44901e1d46e0d718d5443b553aa4ac5
# Parent  3cc10f0aae37a187df73b00f9e1a882cceaffe86
Implement LIST command

diff -r 3cc10f0aae37 -r d4e5d8cbe449 netserver/HWProto.hs
--- a/netserver/HWProto.hs	Sun May 04 14:07:26 2008 +0000
+++ b/netserver/HWProto.hs	Sun May 04 14:21:47 2008 +0000
@@ -37,6 +37,9 @@
 -- 'noRoom' clients state command handlers
 handleCmd_noRoom :: Handle -> [ClientInfo] -> [RoomInfo] -> [String] -> ([ClientInfo], [RoomInfo], [Handle], [String])
 
+handleCmd_noRoom clhandle clients rooms ("LIST":[]) =
+		(clients, rooms, [clhandle], ["ROOMS"] ++ map (\r -> name r) rooms)
+
 handleCmd_noRoom clhandle clients rooms ("CREATE":newRoom:roomPassword:[]) =
 	if haveSameRoom then
 		(clients, rooms, [clhandle], ["WARNING", "There's already a room with that name"])