equal
deleted
inserted
replaced
60 when (uid == hashUnique uid') $ processAction (ProcessAccountInfo info) |
60 when (uid == hashUnique uid') $ processAction (ProcessAccountInfo info) |
61 return () |
61 return () |
62 |
62 |
63 TimerAction tick -> |
63 TimerAction tick -> |
64 mapM_ processAction $ |
64 mapM_ processAction $ |
65 PingAll : [StatsAction | even tick] |
65 PingAll |
|
66 : [StatsAction | even tick] |
|
67 ++ [Cleanup | tick `mod` 100 == 0] |
66 |
68 |
67 |
69 |
68 startServer :: ServerInfo -> IO () |
70 startServer :: ServerInfo -> IO () |
69 startServer si = do |
71 startServer si = do |
70 noticeM "Core" $ "Listening on port " ++ show (listenPort si) |
72 noticeM "Core" $ "Listening on port " ++ show (listenPort si) |
77 _ <- forkIO $ timerLoop 0 $ coreChan si |
79 _ <- forkIO $ timerLoop 0 $ coreChan si |
78 |
80 |
79 startDBConnection si |
81 startDBConnection si |
80 |
82 |
81 rnc <- newRoomsAndClients newRoom |
83 rnc <- newRoomsAndClients newRoom |
|
84 jm <- newJoinMonitor |
82 |
85 |
83 evalStateT mainLoop (ServerState Nothing si Set.empty rnc) |
86 evalStateT mainLoop (ServerState Nothing si Set.empty rnc jm) |