gameServer/Actions.hs
changeset 1925 ec923e56c444
parent 1923 956b6b3529bc
child 1926 cb46fbdcaa41
equal deleted inserted replaced
1924:8f8fe856ce9d 1925:ec923e56c444
    32 	| KickRoomClient Int -- clID
    32 	| KickRoomClient Int -- clID
    33 	| BanClient String -- nick
    33 	| BanClient String -- nick
    34 	| RemoveClientTeams Int -- clID
    34 	| RemoveClientTeams Int -- clID
    35 	| ModifyClient (ClientInfo -> ClientInfo)
    35 	| ModifyClient (ClientInfo -> ClientInfo)
    36 	| ModifyRoom (RoomInfo -> RoomInfo)
    36 	| ModifyRoom (RoomInfo -> RoomInfo)
       
    37 	| ModifyServerInfo (ServerInfo -> ServerInfo)
    37 	| AddRoom String String
    38 	| AddRoom String String
    38 	| CheckRegistered
    39 	| CheckRegistered
    39 	| ProcessAccountInfo AccountInfo
    40 	| ProcessAccountInfo AccountInfo
    40 	| Dump
    41 	| Dump
    41 
    42 
   148 	return (clID, serverInfo, clients, adjust func rID rooms)
   149 	return (clID, serverInfo, clients, adjust func rID rooms)
   149 	where
   150 	where
   150 		rID = roomID $ clients ! clID
   151 		rID = roomID $ clients ! clID
   151 
   152 
   152 
   153 
       
   154 processAction (clID, serverInfo, clients, rooms) (ModifyServerInfo func) = do
       
   155 	return (clID, func serverInfo, clients, rooms)
       
   156 
       
   157 
   153 processAction (clID, serverInfo, clients, rooms) (RoomAddThisClient rID) = do
   158 processAction (clID, serverInfo, clients, rooms) (RoomAddThisClient rID) = do
   154 	processAction (
   159 	processAction (
   155 		clID,
   160 		clID,
   156 		serverInfo,
   161 		serverInfo,
   157 		adjust (\cl -> cl{roomID = rID}) clID clients,
   162 		adjust (\cl -> cl{roomID = rID}) clID clients,