gameServer/HWProtoInRoomState.hs
changeset 9454 ac1874d56057
parent 9304 3f4c3fc146c2
child 9521 8054d9d775fd
child 9702 27006953d901
equal deleted inserted replaced
9452:a669869ee44c 9454:ac1874d56057
   285 
   285 
   286     return $
   286     return $
   287         if not $ isMaster cl then
   287         if not $ isMaster cl then
   288             [ProtocolError $ loc "Not room master"]
   288             [ProtocolError $ loc "Not room master"]
   289         else
   289         else
       
   290         if illegalName newName then 
       
   291             [Warning $ loc "Illegal room name"]
       
   292         else
   290         if isJust $ find (\r -> newName == name r) rs then
   293         if isJust $ find (\r -> newName == name r) rs then
   291             [Warning $ loc "Room with such name already exists"]
   294             [Warning $ loc "Room with such name already exists"]
   292         else
   295         else
   293             [ModifyRoom roomUpdate,
   296             [ModifyRoom roomUpdate,
   294             AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo (nick cl) (roomUpdate rm))]
   297             AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo (nick cl) (roomUpdate rm))]