equal
deleted
inserted
replaced
464 withStateT (\as -> as{clientIndex = Just ci}) $ |
464 withStateT (\as -> as{clientIndex = Just ci}) $ |
465 processAction (ByeClient "Ping timeout") |
465 processAction (ByeClient "Ping timeout") |
466 |
466 |
467 |
467 |
468 processAction StatsAction = do |
468 processAction StatsAction = do |
469 rnc <- gets roomsClients |
|
470 si <- gets serverInfo |
469 si <- gets serverInfo |
|
470 when (not $ shutdownPending si) $ do |
|
471 rnc <- gets roomsClients |
471 (roomsNum, clientsNum) <- io $ withRoomsAndClients rnc st |
472 (roomsNum, clientsNum) <- io $ withRoomsAndClients rnc st |
472 io $ writeChan (dbQueries si) $ SendStats clientsNum (roomsNum - 1) |
473 io $ writeChan (dbQueries si) $ SendStats clientsNum (roomsNum - 1) |
473 where |
474 where |
474 st irnc = (length $ allRooms irnc, length $ allClients irnc) |
475 st irnc = (length $ allRooms irnc, length $ allClients irnc) |
475 |
476 |