From b36bacf2869c51bbbfe628ad431080971fab409c Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 26 Aug 2015 05:19:28 +0200
Subject: [PATCH] Fix replay mode overwriting save file on quit.

---
 roguelike-server | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/roguelike-server b/roguelike-server
index 344f5a5..57f0b6c 100755
--- a/roguelike-server
+++ b/roguelike-server
@@ -1111,8 +1111,9 @@ def command_ping():
 
 def command_quit():
     """Abort server process."""
-    save_world()
-    atomic_write(io_db["path_record"], io_db["record_chunk"], do_append=True)
+    if None == opts.replay:
+        save_world()
+        atomic_write(io_db["path_record"], io_db["record_chunk"], do_append=True)
     raise SystemExit("received QUIT command")
 
 
-- 
2.30.2