equal
deleted
inserted
replaced
156 |
156 |
157 handleCmd_inRoom ["TOGGLE_READY"] = do |
157 handleCmd_inRoom ["TOGGLE_READY"] = do |
158 cl <- thisClient |
158 cl <- thisClient |
159 chans <- roomClientsChans |
159 chans <- roomClientsChans |
160 return [ |
160 return [ |
|
161 ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}), |
161 ModifyClient (\c -> c{isReady = not $ isReady cl}), |
162 ModifyClient (\c -> c{isReady = not $ isReady cl}), |
162 ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}), |
|
163 AnswerClients chans $ if clientProto cl < 38 then |
163 AnswerClients chans $ if clientProto cl < 38 then |
164 [if isReady cl then "NOT_READY" else "READY", nick cl] |
164 [if isReady cl then "NOT_READY" else "READY", nick cl] |
165 else |
165 else |
166 ["CLIENT_FLAGS", if isReady cl then "-r" else "+r", nick cl] |
166 ["CLIENT_FLAGS", if isReady cl then "-r" else "+r", nick cl] |
167 ] |
167 ] |