gameServer/Actions.hs
changeset 6012 6bac93097da3
parent 5996 2c72fe81dd37
child 6068 e18713ecf1e0
equal deleted inserted replaced
6011:519f8a58c021 6012:6bac93097da3
     1 {-# LANGUAGE OverloadedStrings #-}
     1 {-# LANGUAGE CPP, OverloadedStrings #-}
     2 module Actions where
     2 module Actions where
     3 
     3 
     4 import Control.Concurrent
     4 import Control.Concurrent
     5 import qualified Data.Set as Set
     5 import qualified Data.Set as Set
     6 import qualified Data.Sequence as Seq
     6 import qualified Data.Sequence as Seq
   505             noticeM "Core" "Spawning new server"
   505             noticeM "Core" "Spawning new server"
   506             _ <- createProcess (proc "./hedgewars-server" args)
   506             _ <- createProcess (proc "./hedgewars-server" args)
   507             return ()
   507             return ()
   508         processAction $ ModifyServerInfo (\s -> s{shutdownPending = True})
   508         processAction $ ModifyServerInfo (\s -> s{shutdownPending = True})
   509 
   509 
       
   510 #if defined(OFFICIAL_SERVER)
   510 processAction SaveReplay = do
   511 processAction SaveReplay = do
   511     ri <- clientRoomA
   512     ri <- clientRoomA
   512     rnc <- gets roomsClients
   513     rnc <- gets roomsClients
   513     io $ do
   514     io $ do
   514         r <- room'sM rnc id ri
   515         r <- room'sM rnc id ri
   515         saveReplay r
   516         saveReplay r
       
   517 #else
       
   518 processAction SaveReplay = return ()
       
   519 #endif