gameServer/HWProtoInRoomState.hs
branchflibqtfrontend
changeset 8227 3a2ce574aa3b
parent 8189 328f429c3ecc
child 8244 0f8893faeb00
equal deleted inserted replaced
8224:48bb7adc42fe 8227:3a2ce574aa3b
   262             [ProtocolError "Not room master"]
   262             [ProtocolError "Not room master"]
   263         else
   263         else
   264             [ModifyRoom (\r -> r{isRestrictedTeams = not $ isRestrictedTeams r})]
   264             [ModifyRoom (\r -> r{isRestrictedTeams = not $ isRestrictedTeams r})]
   265 
   265 
   266 
   266 
       
   267 handleCmd_inRoom ["TOGGLE_REGISTERED_ONLY"] = do
       
   268     cl <- thisClient
       
   269     return $
       
   270         if not $ isMaster cl then
       
   271             [ProtocolError "Not room master"]
       
   272         else
       
   273             [ModifyRoom (\r -> r{isRegisteredOnly = not $ isRegisteredOnly r})]
       
   274 
   267 handleCmd_inRoom ["ROOM_NAME", newName] = do
   275 handleCmd_inRoom ["ROOM_NAME", newName] = do
   268     cl <- thisClient
   276     cl <- thisClient
   269     rs <- allRoomInfos
   277     rs <- allRoomInfos
   270     rm <- thisRoom
   278     rm <- thisRoom
   271     chans <- sameProtoChans
   279     chans <- sameProtoChans