netserver/hedgewars-server.hs
changeset 1500 5721af6d73f0
parent 1499 870305c40b81
child 1502 db1f1dd12321
equal deleted inserted replaced
1499:870305c40b81 1500:5721af6d73f0
    83 					atomically $ writeTChan (chan $ fromJust $ clientByHandle ch clients) ["QUIT", show e] >> return []  -- cannot just remove
    83 					atomically $ writeTChan (chan $ fromJust $ clientByHandle ch clients) ["QUIT", show e] >> return []  -- cannot just remove
    84 			) $
    84 			) $
    85 			do
    85 			do
    86 			forM_ answer (\str -> hPutStrLn ch str)
    86 			forM_ answer (\str -> hPutStrLn ch str)
    87 			hPutStrLn ch ""
    87 			hPutStrLn ch ""
    88 			--hFlush ch
    88 			hFlush ch
    89 			if head answer == "BYE" then return [ch] else return []
    89 			if head answer == "BYE" then return [ch] else return []
    90 
    90 
    91 	let outHandles = concat clHandles'
    91 	let outHandles = concat clHandles'
    92 	unless (null outHandles) $ putStrLn ((show $ length outHandles) ++ " / " ++ (show $ length clients) ++ " : " ++ (show answer))
    92 	unless (null outHandles) $ putStrLn ((show $ length outHandles) ++ " / " ++ (show $ length clients) ++ " : " ++ (show answer))
    93 
    93