--- a/gameServer/Actions.hs Tue Apr 12 21:28:37 2011 +0400
+++ b/gameServer/Actions.hs Tue Apr 12 22:31:48 2011 +0400
@@ -17,6 +17,7 @@
import Data.Unique
import Control.Arrow
import Control.Exception
+import OfficialServer.GameReplayStore
-----------------------------
import CoreTypes
import Utils
@@ -60,6 +61,7 @@
| AddNick2Bans B.ByteString B.ByteString UTCTime
| AddIP2Bans B.ByteString B.ByteString UTCTime
| CheckBanned
+ | SaveReplay
type CmdHandler = [B.ByteString] -> Reader (ClientIndex, IRnC) [Action]
@@ -470,3 +472,10 @@
throw RestartException
else
processAction $ ModifyServerInfo (\s -> s{restartPending=True})
+
+processAction SaveReplay = do
+ ri <- clientRoomA
+ rnc <- gets roomsClients
+ io $ do
+ r <- room'sM rnc id ri
+ saveReplay r