gameServer/hedgewars-server.hs
changeset 4962 705c6186ad9d
parent 4960 3b54b1c9b768
child 4968 8e1673f0dc05
equal deleted inserted replaced
4961:9075d7effdf2 4962:705c6186ad9d
     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)