equal
deleted
inserted
replaced
109 cl <- thisClient |
109 cl <- thisClient |
110 clNick <- clientNick |
110 clNick <- clientNick |
111 clChan <- thisClientChans |
111 clChan <- thisClientChans |
112 othChans <- roomOthersChans |
112 othChans <- roomOthersChans |
113 roomChans <- roomClientsChans |
113 roomChans <- roomClientsChans |
114 let isRegistered = (<) 0 . B.length . webPassword $ cl |
|
115 teamColor <- |
114 teamColor <- |
116 if clientProto cl < 42 then |
115 if clientProto cl < 42 then |
117 return color |
116 return color |
118 else |
117 else |
119 liftM (head . (L.\\) (map B.singleton ['0'..]) . map teamcolor . teams) thisRoom |
118 liftM (head . (L.\\) (map B.singleton ['0'..]) . map teamcolor . teams) thisRoom |
121 let hhNum = newTeamHHNum roomTeams $ |
120 let hhNum = newTeamHHNum roomTeams $ |
122 if not $ null roomTeams then |
121 if not $ null roomTeams then |
123 minimum [hhnum $ head roomTeams, canAddNumber roomTeams] |
122 minimum [hhnum $ head roomTeams, canAddNumber roomTeams] |
124 else |
123 else |
125 defaultHedgehogsNumber rm |
124 defaultHedgehogsNumber rm |
126 let newTeam = clNick `seq` TeamInfo clNick tName teamColor grave fort voicepack flag isRegistered dif hhNum (hhsList hhsInfo) |
125 let newTeam = clNick `seq` TeamInfo clNick tName teamColor grave fort voicepack flag (isRegistered cl) dif hhNum (hhsList hhsInfo) |
127 return $ |
126 return $ |
128 if not . null . drop (teamsNumberLimit rm - 1) $ roomTeams then |
127 if not . null . drop (teamsNumberLimit rm - 1) $ roomTeams then |
129 [Warning $ loc "too many teams"] |
128 [Warning $ loc "too many teams"] |
130 else if canAddNumber roomTeams <= 0 then |
129 else if canAddNumber roomTeams <= 0 then |
131 [Warning $ loc "too many hedgehogs"] |
130 [Warning $ loc "too many hedgehogs"] |