gameServer/HWProtoLobbyState.hs
changeset 9303 457efde100b5
parent 9109 878f06e9c484
child 9304 3f4c3fc146c2
equal deleted inserted replaced
9302:1cf37fd7bc47 9303:457efde100b5
     2 module HWProtoLobbyState where
     2 module HWProtoLobbyState where
     3 
     3 
     4 import Data.Maybe
     4 import Data.Maybe
     5 import Data.List
     5 import Data.List
     6 import Control.Monad.Reader
     6 import Control.Monad.Reader
       
     7 import qualified Data.ByteString.Char8 as B
     7 --------------------------------------
     8 --------------------------------------
     8 import CoreTypes
     9 import CoreTypes
     9 import Actions
    10 import Actions
    10 import Utils
    11 import Utils
    11 import HandlerUtils
    12 import HandlerUtils
    75     return $
    76     return $
    76         if isNothing maybeRI || not sameProto then
    77         if isNothing maybeRI || not sameProto then
    77             [Warning $ loc "No such room"]
    78             [Warning $ loc "No such room"]
    78             else if isRestrictedJoins jRoom then
    79             else if isRestrictedJoins jRoom then
    79             [Warning $ loc "Joining restricted"]
    80             [Warning $ loc "Joining restricted"]
    80             else if isRegisteredOnly jRoom then
    81             else if isRegisteredOnly jRoom && (B.null . webPassword $ cl) then
    81             [Warning $ loc "Registered users only"]
    82             [Warning $ loc "Registered users only"]
    82             else if isBanned then
    83             else if isBanned then
    83             [Warning $ loc "You are banned in this room"]
    84             [Warning $ loc "You are banned in this room"]
    84             else if roomPassword /= password jRoom then
    85             else if roomPassword /= password jRoom then
    85             [NoticeMessage WrongPassword]
    86             [NoticeMessage WrongPassword]