equal
deleted
inserted
replaced
175 client = clients IntMap.! clID |
175 client = clients IntMap.! clID |
176 room = rooms IntMap.! (roomID client) |
176 room = rooms IntMap.! (roomID client) |
177 answerRemovedTeams = map (\t -> AnswerThisRoom ["REMOVE_TEAM", t]) $ leftTeams room |
177 answerRemovedTeams = map (\t -> AnswerThisRoom ["REMOVE_TEAM", t]) $ leftTeams room |
178 |
178 |
179 |
179 |
|
180 handleCmd_inRoom clID clients _ ["TOGGLE_RESTRICT_JOINS"] = |
|
181 if isMaster client then |
|
182 [ModifyRoom (\r -> r{isRestrictedJoins = not $ isRestrictedJoins r})] |
|
183 else |
|
184 [ProtocolError "Not room master"] |
|
185 where |
|
186 client = clients IntMap.! clID |
|
187 |
|
188 |
|
189 handleCmd_inRoom clID clients _ ["TOGGLE_RESTRICT_TEAMS"] = |
|
190 if isMaster client then |
|
191 [ModifyRoom (\r -> r{isRestrictedTeams = not $ isRestrictedTeams r})] |
|
192 else |
|
193 [ProtocolError "Not room master"] |
|
194 where |
|
195 client = clients IntMap.! clID |
|
196 |
|
197 |
180 handleCmd_inRoom clID _ _ _ = [ProtocolError "Incorrect command (state: in room)"] |
198 handleCmd_inRoom clID _ _ _ = [ProtocolError "Incorrect command (state: in room)"] |