gameServer/Actions.hs
changeset 4923 c7829611c682
parent 4922 89777ce0d273
child 4932 f11d80bac7ed
equal deleted inserted replaced
4922:89777ce0d273 4923:c7829611c682
   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             mapM_ processAction [AnswerClients [chan] ["ASKPASSWORD"], ModifyClient (\c -> c{webPassword = passwd})]
   328             mapM_ processAction [AnswerClients [chan] ["ASKPASSWORD"], ModifyClient (\c -> c{webPassword = passwd, isAdministrator = isAdmin})]
   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