Fix "registered only" option
authorunc0rr
Sat, 29 Jun 2013 00:18:17 +0400
changeset 9303 457efde100b5
parent 9302 1cf37fd7bc47
child 9304 3f4c3fc146c2
Fix "registered only" option
gameServer/HWProtoLobbyState.hs
--- a/gameServer/HWProtoLobbyState.hs	Sat Jun 29 16:05:17 2013 +0200
+++ b/gameServer/HWProtoLobbyState.hs	Sat Jun 29 00:18:17 2013 +0400
@@ -4,6 +4,7 @@
 import Data.Maybe
 import Data.List
 import Control.Monad.Reader
+import qualified Data.ByteString.Char8 as B
 --------------------------------------
 import CoreTypes
 import Actions
@@ -77,7 +78,7 @@
             [Warning $ loc "No such room"]
             else if isRestrictedJoins jRoom then
             [Warning $ loc "Joining restricted"]
-            else if isRegisteredOnly jRoom then
+            else if isRegisteredOnly jRoom && (B.null . webPassword $ cl) then
             [Warning $ loc "Registered users only"]
             else if isBanned then
             [Warning $ loc "You are banned in this room"]