gameServer/Actions.hs
changeset 5210 a5329e52a71b
parent 5209 f7a610e2ef5f
child 5211 8ebf92014447
equal deleted inserted replaced
5209:f7a610e2ef5f 5210:a5329e52a71b
   473     where
   473     where
   474           st irnc = (length $ allRooms irnc, length $ allClients irnc)
   474           st irnc = (length $ allRooms irnc, length $ allClients irnc)
   475 
   475 
   476 processAction RestartServer = do
   476 processAction RestartServer = do
   477     sock <- gets (fromJust . serverSocket . serverInfo)
   477     sock <- gets (fromJust . serverSocket . serverInfo)
       
   478     args <- gets (runArgs . serverInfo)
   478     io $ do
   479     io $ do
   479         noticeM "Core" "Closing listening socket"
   480         noticeM "Core" "Closing listening socket"
   480         sClose sock
   481         sClose sock
   481         noticeM "Core" "Spawning new server"
   482         noticeM "Core" "Spawning new server"
   482         _ <- createProcess (proc "./hedgewars-server" [])
   483         _ <- createProcess (proc "./hedgewars-server" args)
   483         return ()
   484         return ()
   484     processAction $ ModifyServerInfo (\s -> s{shutdownPending=True})
   485     processAction $ ModifyServerInfo (\s -> s{shutdownPending=True})
   485 
   486 
   486 processAction SaveReplay = do
   487 processAction SaveReplay = do
   487     ri <- clientRoomA
   488     ri <- clientRoomA