gameServer/HWProtoInRoomState.hs
changeset 6753 e95b1f62d0de
parent 6738 dd98869d74b4
child 6756 344d32bb1328
equal deleted inserted replaced
6752:11d898afe582 6753:e95b1f62d0de
   208 handleCmd_inRoom ["ROUNDFINISHED", correctly] = do
   208 handleCmd_inRoom ["ROUNDFINISHED", correctly] = do
   209     clId <- asks fst
   209     clId <- asks fst
   210     cl <- thisClient
   210     cl <- thisClient
   211     rm <- thisRoom
   211     rm <- thisRoom
   212     chans <- roomClientsChans
   212     chans <- roomClientsChans
       
   213     let clTeams = map teamname . filter (\t -> teamowner t == nick cl) . teams $ rm
   213 
   214 
   214     if isJust $ gameInfo rm then
   215     if isJust $ gameInfo rm then
   215         if isMaster cl && isCorrect then
   216         if isMaster cl && isCorrect then
   216             return $
   217             return $
   217                 SaveReplay
   218                 SaveReplay
   222                         }
   223                         }
   223                     )
   224                     )
   224                 : UnreadyRoomClients
   225                 : UnreadyRoomClients
   225                 : answerRemovedTeams chans rm
   226                 : answerRemovedTeams chans rm
   226             else if not isCorrect then
   227             else if not isCorrect then
   227                 return [RemoveClientTeams clId]
   228                 return $ map SendTeamRemovalMessage clTeams
   228                 else
   229                 else
   229                 return []
   230                 return []
   230         else
   231         else
   231         return []
   232         return []
   232     where
   233     where