equal
deleted
inserted
replaced
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 |