gameServer/Actions.hs
changeset 1847 2178c0fc838c
parent 1846 24d0074d4eed
child 1862 7f303aa066da
equal deleted inserted replaced
1846:24d0074d4eed 1847:2178c0fc838c
   257 	return (clID, serverInfo, clients, rooms)
   257 	return (clID, serverInfo, clients, rooms)
   258 
   258 
   259 
   259 
   260 processAction (clID, serverInfo, clients, rooms) (ProcessAccountInfo info) = do
   260 processAction (clID, serverInfo, clients, rooms) (ProcessAccountInfo info) = do
   261 	case info of
   261 	case info of
   262 		HasAccount passwd -> do
   262 		HasAccount passwd isAdmin -> do
   263 			infoM "Clients" $ show clID ++ " has account"
   263 			infoM "Clients" $ show clID ++ " has account"
   264 			writeChan (sendChan $ clients ! clID) ["ASKPASSWORD"]
   264 			writeChan (sendChan $ clients ! clID) ["ASKPASSWORD"]
   265 			return (clID, serverInfo, adjust (\cl -> cl{webPassword = passwd}) clID clients, rooms)
   265 			return (clID, serverInfo, adjust (\cl -> cl{webPassword = passwd, isAdministrator = isAdmin}) clID clients, rooms)
   266 		Guest -> do
   266 		Guest -> do
   267 			infoM "Clients" $ show clID ++ " is guest"
   267 			infoM "Clients" $ show clID ++ " is guest"
   268 			processAction (clID, serverInfo, adjust (\cl -> cl{logonPassed = True}) clID clients, rooms) MoveToLobby
   268 			processAction (clID, serverInfo, adjust (\cl -> cl{logonPassed = True}) clID clients, rooms) MoveToLobby
   269 
   269 
   270 
   270