From 1665b626bed54e9e2455405af3f1df722b3850e6 Mon Sep 17 00:00:00 2001 From: Thomas Lake Date: Tue, 7 May 2019 09:48:17 +0100 Subject: [PATCH] Fix replay loop bug --- mw.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mw.js b/mw.js index e81ce9e..8f4257f 100644 --- a/mw.js +++ b/mw.js @@ -6,7 +6,7 @@ // setting it to 0 disables it. // This can be set within the talker by issuing the command ",debug" var debugmode = 0; - +var replayed = false; // If we don't have any colour info then create space for it if (mw.store["usercolours"] === undefined) { mw.store["usercolours"] = "{}"; @@ -337,8 +337,9 @@ function handleEvent(event) { } //if it's us, then do a auto replay but not in debugmode - if (tje.user == mw.whoami() && !debugmode >= 1) { + if (tje.user == mw.whoami() && !debugmode >= 1 && !replayed) { mw.exec("replay count 50"); + replayed = true; } //stop talker_join handling -- GitLab