--- a/netserver/Miscutils.hs Sun May 04 13:49:55 2008 +0000
+++ b/netserver/Miscutils.hs Sun May 04 14:07:26 2008 +0000
@@ -29,6 +29,9 @@
clientByHandle :: Handle -> [ClientInfo] -> ClientInfo
clientByHandle clhandle clients = fromJust $ find (\ci -> handle ci == clhandle) clients
+roomByName :: String -> [RoomInfo] -> RoomInfo
+roomByName roomName rooms = fromJust $ find (\room -> roomName == name room) rooms
+
fromRoomHandles :: String -> [ClientInfo] -> [Handle]
fromRoomHandles roomName clients = map (\ci -> handle ci) $ filter (\ci -> room ci == roomName) clients