equal
deleted
inserted
replaced
81 let nicks = map nick jRoomClients |
81 let nicks = map nick jRoomClients |
82 let owner = find isMaster jRoomClients |
82 let owner = find isMaster jRoomClients |
83 let chans = map sendChan (cl : jRoomClients) |
83 let chans = map sendChan (cl : jRoomClients) |
84 let isBanned = host cl `elem` roomBansList jRoom |
84 let isBanned = host cl `elem` roomBansList jRoom |
85 let clTeams = |
85 let clTeams = |
86 if (clientProto cl >= 48) && (isJust $ gameInfo jRoom) then |
86 if (clientProto cl >= 48) && (isJust $ gameInfo jRoom) && isRegistered cl then |
87 filter (\t -> teamowner t == nick cl) . teamsAtStart . fromJust $ gameInfo jRoom |
87 filter (\t -> teamowner t == nick cl) . teamsAtStart . fromJust $ gameInfo jRoom |
88 else |
88 else |
89 [] |
89 [] |
90 let clTeamsNames = map teamname clTeams |
90 let clTeamsNames = map teamname clTeams |
91 return $ |
91 return $ |
93 [Warning $ loc "No such room"] |
93 [Warning $ loc "No such room"] |
94 else if (not sameProto) && (not $ isAdministrator cl) then |
94 else if (not sameProto) && (not $ isAdministrator cl) then |
95 [Warning $ loc "Room version incompatible to your hedgewars version"] |
95 [Warning $ loc "Room version incompatible to your hedgewars version"] |
96 else if isRestrictedJoins jRoom && not (hasSuperPower cl) then |
96 else if isRestrictedJoins jRoom && not (hasSuperPower cl) then |
97 [Warning $ loc "Joining restricted"] |
97 [Warning $ loc "Joining restricted"] |
98 else if isRegisteredOnly jRoom && (B.null . webPassword $ cl) && not (isAdministrator cl) then |
98 else if isRegisteredOnly jRoom && (not $ isRegistered cl) && not (isAdministrator cl) then |
99 [Warning $ loc "Registered users only"] |
99 [Warning $ loc "Registered users only"] |
100 else if isBanned then |
100 else if isBanned then |
101 [Warning $ loc "You are banned in this room"] |
101 [Warning $ loc "You are banned in this room"] |
102 else if roomPassword /= password jRoom && not (hasSuperPower cl) then |
102 else if roomPassword /= password jRoom && not (hasSuperPower cl) then |
103 [NoticeMessage WrongPassword] |
103 [NoticeMessage WrongPassword] |