diff -r 98de5dc5fda7 -r 7f303aa066da gameServer/Actions.hs --- a/gameServer/Actions.hs Thu Mar 05 14:54:02 2009 +0000 +++ b/gameServer/Actions.hs Thu Mar 05 19:53:40 2009 +0000 @@ -27,6 +27,7 @@ | ProtocolError String | Warning String | ByeClient String + | KickClient Int -- clID | ModifyClient (ClientInfo -> ClientInfo) | ModifyRoom (RoomInfo -> RoomInfo) | AddRoom String String @@ -36,6 +37,7 @@ type CmdHandler = Int -> Clients -> Rooms -> [String] -> [Action] +replaceID a (b, c, d, e) = (a, c, d, e) processAction :: (Int, ServerInfo, Clients, Rooms) -> Action -> IO (Int, ServerInfo, Clients, Rooms) @@ -281,3 +283,5 @@ [] +processAction (clID, serverInfo, clients, rooms) (KickClient kickID) = do + liftM2 replaceID (return clID) (processAction (kickID, serverInfo, clients, rooms) $ ByeClient "Kicked") \ No newline at end of file