gameServer/HWProtoInRoomState.hs
changeset 10884 7b76811fb689
parent 10882 ed7717f659ae
child 11046 47a8c19ecb60
equal deleted inserted replaced
10883:294ef49efdd2 10884:7b76811fb689
   123                     minimum [hhnum $ head roomTeams, canAddNumber roomTeams]
   123                     minimum [hhnum $ head roomTeams, canAddNumber roomTeams]
   124                 else
   124                 else
   125                     defaultHedgehogsNumber rm
   125                     defaultHedgehogsNumber rm
   126         let newTeam = clNick `seq` TeamInfo clNick tName teamColor grave fort voicepack flag isRegistered dif hhNum (hhsList hhsInfo)
   126         let newTeam = clNick `seq` TeamInfo clNick tName teamColor grave fort voicepack flag isRegistered dif hhNum (hhsList hhsInfo)
   127         return $
   127         return $
   128             if not . null . drop (teamsNumberLimit rm) $ roomTeams then
   128             if not . null . drop (teamsNumberLimit rm - 1) $ roomTeams then
   129                 [Warning $ loc "too many teams"]
   129                 [Warning $ loc "too many teams"]
   130             else if canAddNumber roomTeams <= 0 then
   130             else if canAddNumber roomTeams <= 0 then
   131                 [Warning $ loc "too many hedgehogs"]
   131                 [Warning $ loc "too many hedgehogs"]
   132             else if isJust $ findTeam rm then
   132             else if isJust $ findTeam rm then
   133                 [Warning $ loc "There's already a team with same name in the list"]
   133                 [Warning $ loc "There's already a team with same name in the list"]