gameServer/ServerState.hs
changeset 8452 170afc3ac39f
parent 8371 0551b5c3de9a
child 9973 7589978c9912
--- a/gameServer/ServerState.hs	Sun Jan 27 21:46:25 2013 +0400
+++ b/gameServer/ServerState.hs	Mon Jan 28 00:50:00 2013 +0400
@@ -5,6 +5,7 @@
     ServerState(..),
     client's,
     allClientsS,
+    allRoomsS,
     roomClientsS,
     sameProtoClientsS,
     io
@@ -40,6 +41,9 @@
 allClientsS :: StateT ServerState IO [ClientInfo]
 allClientsS = gets roomsClients >>= liftIO . clientsM
 
+allRoomsS :: StateT ServerState IO [RoomInfo]
+allRoomsS = gets roomsClients >>= liftIO . roomsM
+
 roomClientsS :: RoomIndex -> StateT ServerState IO [ClientInfo]
 roomClientsS ri = do
     rnc <- gets roomsClients