gameServer/HWProtoInRoomState.hs
changeset 8232 fb5aa767a2a0
parent 8189 328f429c3ecc
child 8244 0f8893faeb00
equal deleted inserted replaced
8228:8cc5dc7f7ef9 8232:fb5aa767a2a0
   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