gameServer/ServerCore.hs
changeset 3425 ead2ed20dfd4
parent 2948 3f21a9dc93d0
child 3435 4e4f88a7bdf2
--- a/gameServer/ServerCore.hs	Tue May 04 21:30:25 2010 +0000
+++ b/gameServer/ServerCore.hs	Wed May 05 08:01:37 2010 +0000
@@ -2,7 +2,6 @@
 
 import Network
 import Control.Concurrent
-import Control.Concurrent.STM
 import Control.Concurrent.Chan
 import Control.Monad
 import qualified Data.IntMap as IntMap
@@ -10,7 +9,6 @@
 --------------------------------------
 import CoreTypes
 import NetRoutines
-import Utils
 import HWProtoCore
 import Actions
 import OfficialServer.DBInteraction
@@ -28,7 +26,7 @@
 mainLoop :: ServerInfo -> Clients -> Rooms -> IO ()
 mainLoop serverInfo clients rooms = do
     r <- readChan $ coreChan serverInfo
-    
+
     (newServerInfo, mClients, mRooms) <-
         case r of
             Accept ci ->
@@ -59,11 +57,6 @@
                     foldM processAction (0, serverInfo, clients, rooms) $
                         PingAll : [StatsAction | even tick]
 
-
-    {-          let hadRooms = (not $ null rooms) && (null mrooms)
-                    in unless ((not $ isDedicated serverInfo) && ((null clientsIn) || hadRooms)) $
-                        mainLoop serverInfo acceptChan messagesChan clientsIn mrooms -}
-
     mainLoop newServerInfo mClients mRooms
 
 startServer :: ServerInfo -> Socket -> IO ()
@@ -84,4 +77,4 @@
 
     forkIO $ mainLoop serverInfo IntMap.empty (IntMap.singleton 0 newRoom)
 
-    forever $ threadDelay (60 * 60 * 10^6) >> putStrLn "***"
\ No newline at end of file
+    forever $ threadDelay (60 * 60 * 10^6) >> putStrLn "***"