diff -r 8ffa4ad0d8ea -r f756a1d3324c netserver/Miscutils.hs --- a/netserver/Miscutils.hs Sat Apr 19 19:29:58 2008 +0000 +++ b/netserver/Miscutils.hs Sat Apr 19 19:34:19 2008 +0000 @@ -42,12 +42,13 @@ ls <- readTVar state writeTVar state $ op ls -manipState2 :: TVar[ClientInfo] -> TVar[RoomInfo] -> ([ClientInfo] -> [RoomInfo] -> ([ClientInfo], [RoomInfo])) -> IO() +manipState2 :: TVar[ClientInfo] -> TVar[RoomInfo] -> ([ClientInfo] -> [RoomInfo] -> ([ClientInfo], [RoomInfo], Bool)) -> IO Bool manipState2 state1 state2 op = atomically $ do ls1 <- readTVar state1 ls2 <- readTVar state2 - let (ol1, ol2) = op ls1 ls2 + let (ol1, ol2, res) = op ls1 ls2 writeTVar state1 ol1 writeTVar state2 ol2 + return res