91 return $ |
91 return $ |
92 if isNothing maybeRI then |
92 if isNothing maybeRI then |
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 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 && (B.null . webPassword $ 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 then |
102 else if roomPassword /= password jRoom && not (hasSuperPower cl) then |
103 [NoticeMessage WrongPassword] |
103 [NoticeMessage WrongPassword] |
104 else |
104 else |
105 ( |
105 ( |
106 MoveToRoom jRI |
106 MoveToRoom jRI |
107 : ModifyClient (\c -> c{isJoinedMidGame = isJust $ gameInfo jRoom |
107 : ModifyClient (\c -> c{isJoinedMidGame = isJust $ gameInfo jRoom |