netserver/HWProto.hs
changeset 903 d4e5d8cbe449
parent 902 3cc10f0aae37
child 1082 596b1dcdc1df
equal deleted inserted replaced
902:3cc10f0aae37 903:d4e5d8cbe449
    34 handleCmd_noInfo clhandle clients rooms _ = (clients, rooms, [clhandle], ["ERROR", "Bad command or incorrect parameter"])
    34 handleCmd_noInfo clhandle clients rooms _ = (clients, rooms, [clhandle], ["ERROR", "Bad command or incorrect parameter"])
    35 
    35 
    36 
    36 
    37 -- 'noRoom' clients state command handlers
    37 -- 'noRoom' clients state command handlers
    38 handleCmd_noRoom :: Handle -> [ClientInfo] -> [RoomInfo] -> [String] -> ([ClientInfo], [RoomInfo], [Handle], [String])
    38 handleCmd_noRoom :: Handle -> [ClientInfo] -> [RoomInfo] -> [String] -> ([ClientInfo], [RoomInfo], [Handle], [String])
       
    39 
       
    40 handleCmd_noRoom clhandle clients rooms ("LIST":[]) =
       
    41 		(clients, rooms, [clhandle], ["ROOMS"] ++ map (\r -> name r) rooms)
    39 
    42 
    40 handleCmd_noRoom clhandle clients rooms ("CREATE":newRoom:roomPassword:[]) =
    43 handleCmd_noRoom clhandle clients rooms ("CREATE":newRoom:roomPassword:[]) =
    41 	if haveSameRoom then
    44 	if haveSameRoom then
    42 		(clients, rooms, [clhandle], ["WARNING", "There's already a room with that name"])
    45 		(clients, rooms, [clhandle], ["WARNING", "There's already a room with that name"])
    43 	else
    46 	else