gameServer/Actions.hs
changeset 3653 c0d94fedbd86
parent 3645 c0b3f1bb9316
child 3654 18189fbc7530
equal deleted inserted replaced
3652:df76ccda0648 3653:c0d94fedbd86
   432             if pingsQueue client > 0 then
   432             if pingsQueue client > 0 then
   433                 processAction (clientUID client, serverInfo, rnc) $ ByeClient "Ping timeout"
   433                 processAction (clientUID client, serverInfo, rnc) $ ByeClient "Ping timeout"
   434                 else
   434                 else
   435                 return (clID, serverInfo, rnc)
   435                 return (clID, serverInfo, rnc)
   436 
   436 
   437 
   437 -}
   438 processAction (clID, serverInfo, rnc) (StatsAction) = do
   438 
   439     writeChan (dbQueries serverInfo) $ SendStats (size clients) (size rooms - 1)
   439 processAction (StatsAction) = do
   440     return (clID, serverInfo, rnc)
   440     rnc <- gets roomsClients
   441 
   441     si <- gets serverInfo
   442 -}
   442     (roomsNum, clientsNum) <- liftIO $ withRoomsAndClients rnc stats
       
   443     liftIO $ writeChan (dbQueries si) $ SendStats clientsNum (roomsNum - 1)
       
   444     where
       
   445           stats irnc = (length $ allRooms irnc, length $ allClients irnc)
       
   446