aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/console.py')
-rw-r--r--libmproxy/console.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/libmproxy/console.py b/libmproxy/console.py
index 4c53ef01..b8f766e6 100644
--- a/libmproxy/console.py
+++ b/libmproxy/console.py
@@ -1359,11 +1359,21 @@ class ConsoleMaster(flow.FlowMaster):
)
k = None
elif k == "s":
- self.path_prompt(
- "Server replay: ",
- self.state.last_saveload,
- self.server_playback_path
- )
+ if not self.server_playback:
+ self.path_prompt(
+ "Server replay: ",
+ self.state.last_saveload,
+ self.server_playback_path
+ )
+ else:
+ self.prompt_onekey(
+ "Stop current server replay?",
+ (
+ ("yes", "y"),
+ ("no", "n"),
+ ),
+ self.stop_server_playback_prompt,
+ )
k = None
elif k == "L":
self.path_prompt(
@@ -1399,6 +1409,10 @@ class ConsoleMaster(flow.FlowMaster):
if a != "n":
self.stop_client_playback()
+ def stop_server_playback_prompt(self, a):
+ if a != "n":
+ self.stop_server_playback()
+
def quit(self, a):
if a != "n":
raise Stop