gameServer/ServerCore.hs
changeset 4955 84543ecae8c3
parent 4932 f11d80bac7ed
child 4975 31da8979e5b1
--- a/gameServer/ServerCore.hs	Sat Feb 19 04:04:34 2011 +0100
+++ b/gameServer/ServerCore.hs	Wed Feb 23 18:34:07 2011 +0300
@@ -32,7 +32,7 @@
 
 mainLoop :: StateT ServerState IO ()
 mainLoop = forever $ do
-    get >>= \s -> put $! s
+    -- get >>= \s -> put $! s
 
     si <- gets serverInfo
     r <- liftIO $ readChan $ coreChan si
@@ -53,11 +53,6 @@
             liftIO $ debugM "Clients"  $ "DeleteClient: " ++ show ci
             processAction (DeleteClient ci)
 
-                --else
-                --do
-                --debugM "Clients" "Message from dead client"
-                --return (serverInfo, rnc)
-
         ClientAccountInfo ci uid info -> do
             rnc <- gets roomsClients
             exists <- liftIO $ clientExists rnc ci
@@ -90,6 +85,4 @@
 
     rnc <- newRoomsAndClients newRoom
 
-    _ <- forkIO $ evalStateT mainLoop (ServerState Nothing si Set.empty rnc)
-
-    forever $ threadDelay 3600000000 -- one hour
+    evalStateT mainLoop (ServerState Nothing si Set.empty rnc)