Commit b0e01540 authored by Imran Hussain's avatar Imran Hussain

Add some comments about replay fix

parent a39ac39b
......@@ -6,6 +6,9 @@
// setting it to 0 disables it.
// This can be set within the talker by issuing the command ",debug"
var debugmode = 0;
// As of https://projects.sucs.org/milliways/mw/commit/de6615925555f274348afa3a0ab22bf9a7229a2f
// We get more events in replay, this bool is used to track whether we have seen
// our orignal talker join event or not
var replayed = false;
// If we don't have any colour info then create space for it
if (mw.store["usercolours"] === undefined) {
......@@ -336,10 +339,12 @@ function handleEvent(event) {
mw.print("DEBUG: tje.channel: " + tje.channel);
}
//if it's us, then do a auto replay but not in debugmode
//if it's us, then do a auto replay but not in debugmode or if it's
// a replayed event
if (tje.user == mw.whoami() && !debugmode >= 1 && !replayed) {
mw.exec("replay count 50");
replayed = true;
// set the replayed flag so this if doesn't trigger again
replayed = true;
}
//stop talker_join handling
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment