gameServer/Actions.hs
changeset 10076 b235e520ea21
parent 10058 4ed428389c4e
child 10086 4a7ce724357f
equal deleted inserted replaced
10075:dbaf90a0fbe0 10076:b235e520ea21
   464                 , AnswerClients [chan] ["LOGONPASSED"]
   464                 , AnswerClients [chan] ["LOGONPASSED"]
   465                 ]
   465                 ]
   466                 else
   466                 else
   467                 [ByeClient $ loc "Authentication failed"]
   467                 [ByeClient $ loc "Authentication failed"]
   468     playerLogin p a contr = do
   468     playerLogin p a contr = do
   469         chan <- client's sendChan
   469         cl <- client's id
   470         mapM_ processAction [
   470         mapM_ processAction [
   471             AnswerClients [chan] ["ASKPASSWORD"]
   471             AnswerClients [sendChan cl] $ ("ASKPASSWORD") : if clientProto cl < 48 then [] else [serverSalt cl]
   472             , ModifyClient (\c -> c{webPassword = p, isAdministrator = a, isContributor = contr})
   472             , ModifyClient (\c -> c{webPassword = p, isAdministrator = a, isContributor = contr})
   473             ]
   473             ]
   474 
   474 
   475 processAction JoinLobby = do
   475 processAction JoinLobby = do
   476     chan <- client's sendChan
   476     chan <- client's sendChan