gameServer/Actions.hs
changeset 2155 d897222d3339
parent 2126 cb249fa8e3da
child 2172 80d34c0b9dfe
equal deleted inserted replaced
2154:3d2917be12c3 2155:d897222d3339
    37 	| ModifyClient (ClientInfo -> ClientInfo)
    37 	| ModifyClient (ClientInfo -> ClientInfo)
    38 	| ModifyRoom (RoomInfo -> RoomInfo)
    38 	| ModifyRoom (RoomInfo -> RoomInfo)
    39 	| ModifyServerInfo (ServerInfo -> ServerInfo)
    39 	| ModifyServerInfo (ServerInfo -> ServerInfo)
    40 	| AddRoom String String
    40 	| AddRoom String String
    41 	| CheckRegistered
    41 	| CheckRegistered
       
    42 	| ClearAccountsCache
    42 	| ProcessAccountInfo AccountInfo
    43 	| ProcessAccountInfo AccountInfo
    43 	| Dump
    44 	| Dump
    44 	| AddClient ClientInfo
    45 	| AddClient ClientInfo
    45 	| PingAll
    46 	| PingAll
    46 
    47 
   293 	return (clID, serverInfo, clients, rooms)
   294 	return (clID, serverInfo, clients, rooms)
   294 	where
   295 	where
   295 		client = clients ! clID
   296 		client = clients ! clID
   296 
   297 
   297 
   298 
       
   299 processAction (clID, serverInfo, clients, rooms) (ClearAccountsCache) = do
       
   300 	writeChan (dbQueries serverInfo) $ ClearCache
       
   301 	return (clID, serverInfo, clients, rooms)
       
   302 	where
       
   303 		client = clients ! clID
       
   304 
       
   305 
   298 processAction (clID, serverInfo, clients, rooms) (Dump) = do
   306 processAction (clID, serverInfo, clients, rooms) (Dump) = do
   299 	writeChan (sendChan $ clients ! clID) ["DUMP", show serverInfo, showTree clients, showTree rooms]
   307 	writeChan (sendChan $ clients ! clID) ["DUMP", show serverInfo, showTree clients, showTree rooms]
   300 	return (clID, serverInfo, clients, rooms)
   308 	return (clID, serverInfo, clients, rooms)
   301 
   309 
   302 
   310