equal
deleted
inserted
replaced
232 let clTeams = map teamname . filter (\t -> teamowner t == nick cl) . teams $ rm |
232 let clTeams = map teamname . filter (\t -> teamowner t == nick cl) . teams $ rm |
233 let unsetInGameState = [AnswerClients chans ["CLIENT_FLAGS", "-g", nick cl], ModifyClient (\c -> c{isInGame = False})] |
233 let unsetInGameState = [AnswerClients chans ["CLIENT_FLAGS", "-g", nick cl], ModifyClient (\c -> c{isInGame = False})] |
234 |
234 |
235 if isInGame cl then |
235 if isInGame cl then |
236 if isJust $ gameInfo rm then |
236 if isJust $ gameInfo rm then |
237 if (isMaster cl && isCorrect) then |
237 return $ unsetInGameState ++ map SendTeamRemovalMessage clTeams |
238 return $ FinishGame : unsetInGameState |
|
239 else |
|
240 return $ unsetInGameState ++ map SendTeamRemovalMessage clTeams |
|
241 else |
238 else |
242 return unsetInGameState |
239 return unsetInGameState |
243 else |
240 else |
244 return [] -- don't accept this message twice |
241 return [] -- don't accept this message twice |
245 where |
242 where |