equal
deleted
inserted
replaced
173 else |
173 else |
174 [RemoveTeam tName, |
174 [RemoveTeam tName, |
175 ModifyClient |
175 ModifyClient |
176 (\c -> c{ |
176 (\c -> c{ |
177 teamsInGame = teamsInGame c - 1, |
177 teamsInGame = teamsInGame c - 1, |
178 clientClan = if teamsInGame c == 1 then Nothing else Just $ anotherTeamClan clNick team r |
178 clientClan = if teamsInGame c == 1 then Nothing else anotherTeamClan clNick team r |
179 }) |
179 }) |
180 ] |
180 ] |
181 where |
181 where |
182 anotherTeamClan clNick team = teamcolor . fromMaybe (error "CHECKPOINT 011") . find (\t -> (teamowner t == clNick) && (t /= team)) . teams |
182 anotherTeamClan clNick team = liftM teamcolor . find (\t -> (teamowner t == clNick) && (t /= team)) . teams |
183 findTeam = find (\t -> tName == teamname t) . teams |
183 findTeam = find (\t -> tName == teamname t) . teams |
184 |
184 |
185 |
185 |
186 handleCmd_inRoom ["HH_NUM", teamName, numberStr] = do |
186 handleCmd_inRoom ["HH_NUM", teamName, numberStr] = do |
187 cl <- thisClient |
187 cl <- thisClient |