equal
deleted
inserted
replaced
12 import CoreTypes |
12 import CoreTypes |
13 import Actions |
13 import Actions |
14 import Utils |
14 import Utils |
15 import HandlerUtils |
15 import HandlerUtils |
16 import RoomsAndClients |
16 import RoomsAndClients |
|
17 import EngineInteraction |
17 |
18 |
18 handleCmd_inRoom :: CmdHandler |
19 handleCmd_inRoom :: CmdHandler |
19 |
20 |
20 handleCmd_inRoom ["CHAT", msg] = do |
21 handleCmd_inRoom ["CHAT", msg] = do |
21 n <- clientNick |
22 n <- clientNick |
176 if isMaster cl && playersIn rm == readyPlayers rm && not (isJust $ gameInfo rm) then |
177 if isMaster cl && playersIn rm == readyPlayers rm && not (isJust $ gameInfo rm) then |
177 if enoughClans rm then |
178 if enoughClans rm then |
178 return [ |
179 return [ |
179 ModifyRoom |
180 ModifyRoom |
180 (\r -> r{ |
181 (\r -> r{ |
181 gameInfo = Just $ newGameInfo allPlayersRegistered |
182 gameInfo = Just $ newGameInfo allPlayersRegistered (mapParams rm) (params rm) |
182 } |
183 } |
183 ), |
184 ), |
184 AnswerClients chans ["RUN_GAME"] |
185 AnswerClients chans ["RUN_GAME"] |
185 ] |
186 ] |
186 else |
187 else |