--- 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