gameServer/Actions.hs
branchserver_refactor
changeset 4579 4e61c2a42121
parent 4573 7e3be7d7eeda
child 4585 6e747aef012f
equal deleted inserted replaced
4577:2c43cd7d5ce6 4579:4e61c2a42121
   425 processAction (AddClient client) = do
   425 processAction (AddClient client) = do
   426     rnc <- gets roomsClients
   426     rnc <- gets roomsClients
   427     si <- gets serverInfo
   427     si <- gets serverInfo
   428     liftIO $ do
   428     liftIO $ do
   429         ci <- addClient rnc client
   429         ci <- addClient rnc client
   430         forkIO $ clientRecvLoop (clientSocket client) (coreChan si) ci
   430         t <- forkIO $ clientRecvLoop (clientSocket client) (coreChan si) ci
   431         forkIO $ clientSendLoop (clientSocket client) (sendChan client) ci
   431         forkIO $ clientSendLoop (clientSocket client) t (sendChan client) ci
   432 
   432 
   433         infoM "Clients" (show ci ++ ": New client. Time: " ++ show (connectTime client))
   433         infoM "Clients" (show ci ++ ": New client. Time: " ++ show (connectTime client))
   434 
   434 
   435     processAction $ AnswerClients [sendChan client] ["CONNECTED", "Hedgewars server http://www.hedgewars.org/"]
   435     processAction $ AnswerClients [sendChan client] ["CONNECTED", "Hedgewars server http://www.hedgewars.org/"]
   436 {-        let newLogins = takeWhile (\(_ , time) -> (connectTime client) `diffUTCTime` time <= 11) $ lastLogins serverInfo
   436 {-        let newLogins = takeWhile (\(_ , time) -> (connectTime client) `diffUTCTime` time <= 11) $ lastLogins serverInfo