gameServer/Actions.hs
changeset 4922 89777ce0d273
parent 4918 c6d3aec73f93
child 4923 c7829611c682
equal deleted inserted replaced
4921:2efad3acbb74 4922:89777ce0d273
   323 
   323 
   324 processAction (ProcessAccountInfo info) =
   324 processAction (ProcessAccountInfo info) =
   325     case info of
   325     case info of
   326         HasAccount passwd isAdmin -> do
   326         HasAccount passwd isAdmin -> do
   327             chan <- client's sendChan
   327             chan <- client's sendChan
   328             processAction $ AnswerClients [chan] ["ASKPASSWORD"]
   328             mapM_ processAction [AnswerClients [chan] ["ASKPASSWORD"], ModifyClient (\c -> c{webPassword = passwd})]
   329         Guest -> do
   329         Guest -> do
   330             processAction JoinLobby
   330             processAction JoinLobby
   331         Admin -> do
   331         Admin -> do
   332             mapM processAction [ModifyClient (\cl -> cl{isAdministrator = True}), JoinLobby]
   332             mapM processAction [ModifyClient (\cl -> cl{isAdministrator = True}), JoinLobby]
   333             chan <- client's sendChan
   333             chan <- client's sendChan