netserver/newhwserv.hs
changeset 1341 86d7d5ab22a2
parent 1340 430d210d54ae
child 1350 99a921e292f4
--- a/netserver/newhwserv.hs	Thu Oct 09 21:00:42 2008 +0000
+++ b/netserver/newhwserv.hs	Fri Oct 10 13:18:45 2008 +0000
@@ -11,6 +11,7 @@
 import Data.List
 import Miscutils
 import HWProto
+import Opts
 
 acceptLoop :: Socket -> TChan ClientInfo -> IO ()
 acceptLoop servSock acceptChan = do
@@ -87,5 +88,7 @@
 
 
 main = withSocketsDo $ do
-	serverSocket <- listenOn $ Service "hedgewars"
+	flags <- opts
+	putStrLn $ "Listening on port " ++ show (getPort flags)
+	serverSocket <- listenOn $ PortNumber (getPort flags)
 	startServer serverSocket `finally` sClose serverSocket