gameServer/ServerCore.hs
changeset 9973 7589978c9912
parent 7766 98edc0724a28
child 10017 de822cd3df3a
--- a/gameServer/ServerCore.hs	Sun Jan 12 11:07:49 2014 +0400
+++ b/gameServer/ServerCore.hs	Sun Jan 12 15:15:59 2014 +0400
@@ -62,7 +62,9 @@
 
         TimerAction tick ->
                 mapM_ processAction $
-                    PingAll : [StatsAction | even tick]
+                    PingAll 
+                    : [StatsAction | even tick] 
+                    ++ [Cleanup | tick `mod` 100 == 0]
 
 
 startServer :: ServerInfo -> IO ()
@@ -79,5 +81,6 @@
     startDBConnection si
 
     rnc <- newRoomsAndClients newRoom
+    jm <- newJoinMonitor
 
-    evalStateT mainLoop (ServerState Nothing si Set.empty rnc)
+    evalStateT mainLoop (ServerState Nothing si Set.empty rnc jm)