netserver/newhwserv.hs
changeset 892 dfe97199f17e
parent 891 701f86df9b4c
child 893 149244d86bf1
--- a/netserver/newhwserv.hs	Wed Apr 30 20:14:09 2008 +0000
+++ b/netserver/newhwserv.hs	Wed Apr 30 20:18:30 2008 +0000
@@ -39,7 +39,7 @@
 		Left ci -> do
 			mainLoop servSock acceptChan (ci:clients) rooms
 		Right (line, client) -> do
-			let (doQuit, recipients, strs) = handleCmd client sameRoom rooms $ words line
+			let (recipients, strs) = handleCmd client sameRoom rooms $ words line
 
 			clients' <- forM recipients $
 					\ci -> do
@@ -48,7 +48,7 @@
 							return []
 					`catch` const (hClose (handle ci) >> return [ci])
 
-			client' <- if doQuit then hClose (handle client) >> return [client] else return []
+			client' <- if head strs == "QUIT" then hClose (handle client) >> return [client] else return []
 
 			mainLoop servSock acceptChan (remove (remove clients (concat clients')) client') rooms
 			where