gameServer/HWProtoLobbyState.hs
branchhedgeroid
changeset 6224 42b256eca362
parent 6191 190a8e5d9956
child 6541 08ed346ed341
equal deleted inserted replaced
6055:88cfcd9161d3 6224:42b256eca362
    10 import CoreTypes
    10 import CoreTypes
    11 import Actions
    11 import Actions
    12 import Utils
    12 import Utils
    13 import HandlerUtils
    13 import HandlerUtils
    14 import RoomsAndClients
    14 import RoomsAndClients
       
    15 import EngineInteraction
    15 
    16 
    16 
    17 
    17 answerAllTeams :: ClientInfo -> [TeamInfo] -> [Action]
    18 answerAllTeams :: ClientInfo -> [TeamInfo] -> [Action]
    18 answerAllTeams cl = concatMap toAnswer
    19 answerAllTeams cl = concatMap toAnswer
    19     where
    20     where
    79     let jRoomClients = map (client irnc) $ roomClients irnc jRI
    80     let jRoomClients = map (client irnc) $ roomClients irnc jRI
    80     let nicks = map nick jRoomClients
    81     let nicks = map nick jRoomClients
    81     let chans = map sendChan (cl : jRoomClients)
    82     let chans = map sendChan (cl : jRoomClients)
    82     return $
    83     return $
    83         if isNothing maybeRI || not sameProto then 
    84         if isNothing maybeRI || not sameProto then 
    84             [Warning "No such rooms"]
    85             [Warning "No such room"]
    85             else if isRestrictedJoins jRoom then
    86             else if isRestrictedJoins jRoom then
    86             [Warning "Joining restricted"]
    87             [Warning "Joining restricted"]
    87             else if roomPassword /= password jRoom then
    88             else if roomPassword /= password jRoom then
    88             [Warning "Wrong password"]
    89             [Warning "Wrong password"]
    89             else
    90             else