--- a/gameServer/ServerCore.hs Mon Feb 28 22:28:43 2011 +0300
+++ b/gameServer/ServerCore.hs Thu Mar 03 22:15:13 2011 +0300
@@ -23,14 +23,14 @@
timerLoop tick messagesChan = threadDelay 30000000 >> writeChan messagesChan (TimerAction tick) >> timerLoop (tick + 1) messagesChan
-reactCmd :: [B.ByteString] -> StateT ServerState IO ()
+reactCmd :: [B.ByteString] -> StateT (ServerState c) IO ()
reactCmd cmd = do
(Just ci) <- gets clientIndex
rnc <- gets roomsClients
actions <- liftIO $ withRoomsAndClients rnc (\irnc -> runReader (handleCmd cmd) (ci, irnc))
forM_ (actions `deepseq` actions) processAction
-mainLoop :: StateT ServerState IO ()
+mainLoop :: StateT (ServerState c) IO ()
mainLoop = forever $ do
-- get >>= \s -> put $! s
@@ -68,7 +68,7 @@
PingAll : [StatsAction | even tick]
-startServer :: ServerInfo -> Socket -> IO ()
+startServer :: ServerInfo c -> Socket -> IO ()
startServer si serverSocket = do
putStrLn $ "Listening on port " ++ show (listenPort si)