Reformat code a bit
authorunc0rr
Mon, 03 Nov 2008 14:47:23 +0000
changeset 1468 6e6a75de2fc9
parent 1467 b288aea6b3d2
child 1469 5218aa76939e
Reformat code a bit
netserver/hedgewars-server.hs
--- a/netserver/hedgewars-server.hs	Mon Nov 03 14:24:54 2008 +0000
+++ b/netserver/hedgewars-server.hs	Mon Nov 03 14:47:23 2008 +0000
@@ -61,7 +61,13 @@
 	unless (null recipients) $ putStrLn ("< " ++ (show answer))
 
 	clHandles' <- forM recipients $
-		\ch -> Control.Exception.handle (\e -> putStrLn ("handle exception: " ++ show e) >> if head answer == "BYE" then return [ch] else atomically $ writeTChan (chan $ fromJust $ clientByHandle ch clients)  ["QUIT"] >> return []) $ -- cannot just remove
+		\ch -> Control.Exception.handle
+			(\e -> putStrLn ("handle exception: " ++ show e) >>
+				if head answer == "BYE" then
+					return [ch]
+				else
+					atomically $ writeTChan (chan $ fromJust $ clientByHandle ch clients) ["QUIT"] >> return []  -- cannot just remove
+			) $
 			do
 			forM_ answer (\str -> hPutStrLn ch str)
 			hPutStrLn ch ""