equal
deleted
inserted
replaced
5 import Network.Socket |
5 import Network.Socket |
6 import Network.BSD |
6 import Network.BSD |
7 import Control.Concurrent.Chan |
7 import Control.Concurrent.Chan |
8 import qualified Control.Exception as E |
8 import qualified Control.Exception as E |
9 import System.Log.Logger |
9 import System.Log.Logger |
|
10 import System.Process |
10 ----------------------------------- |
11 ----------------------------------- |
11 import Opts |
12 import Opts |
12 import CoreTypes |
13 import CoreTypes |
13 import ServerCore |
14 import ServerCore |
14 #if defined(OFFICIAL_SERVER) |
15 #if defined(OFFICIAL_SERVER) |
41 ) |
42 ) |
42 |
43 |
43 handleRestart :: ShutdownException -> IO () |
44 handleRestart :: ShutdownException -> IO () |
44 handleRestart ShutdownException = return () |
45 handleRestart ShutdownException = return () |
45 handleRestart RestartException = do |
46 handleRestart RestartException = do |
46 |
47 _ <- createProcess (proc "./hedgewars-server" []) |
47 return () |
48 return () |
48 |
49 |
49 main :: IO () |
50 main :: IO () |
50 main = withSocketsDo $ do |
51 main = withSocketsDo $ do |
51 #if !defined(mingw32_HOST_OS) |
52 #if !defined(mingw32_HOST_OS) |