gameServer/ServerState.hs
changeset 3501 a3159a410e5c
parent 3458 11cd56019f00
child 3502 ad38c653b7d9
--- a/gameServer/ServerState.hs	Sun Jun 06 15:29:33 2010 +0000
+++ b/gameServer/ServerState.hs	Sun Jun 06 19:03:06 2010 +0000
@@ -3,7 +3,8 @@
     module RoomsAndClients,
     clientRoomA,
     ServerState(..),
-    clients
+    client's,
+    allClientsS
     ) where
 
 import Control.Monad.State
@@ -24,9 +25,11 @@
     rnc <- gets roomsClients
     liftIO $ clientRoomM rnc ci
 
-clients :: (ClientInfo -> a) -> StateT ServerState IO a
-clients f = do
+client's :: (ClientInfo -> a) -> StateT ServerState IO a
+client's f = do
     (Just ci) <- gets clientIndex
     rnc <- gets roomsClients
-    liftIO $ clientsM rnc f ci
-    
\ No newline at end of file
+    liftIO $ client'sM rnc f ci
+    
+allClientsS :: StateT ServerState IO [ClientInfo]
+allClientsS = gets roomsClients >>= liftIO . clientsM
\ No newline at end of file