--- a/netserver/newhwserv.hs Sun Oct 05 16:38:26 2008 +0000
+++ b/netserver/newhwserv.hs Sun Oct 05 23:22:14 2008 +0000
@@ -33,7 +33,7 @@
clientLoop handle chan =
listenLoop handle [] chan
`catch` (const $ clientOff >> return ())
- where clientOff = atomically $ writeTChan chan ["QUIT"]
+ where clientOff = atomically $ writeTChan chan ["QUIT"] -- если клиент отключается, то делаем вид, что от него пришла команда QUIT
mainLoop :: Socket -> TChan ClientInfo -> [ClientInfo] -> [RoomInfo] -> IO ()
mainLoop servSock acceptChan clients rooms = do
@@ -48,7 +48,7 @@
let mclients = clientsFunc clients
let mrooms = roomsFunc rooms
- let recipients = handlesFunc client clients rooms
+ let recipients = handlesFunc client mclients mrooms
clHandles' <- forM recipients $
\ch -> do