Merge branch 'atomaka/feature/chat-clear' into 'master'

Clear chat every 15 minutes

Chat logging is likely to be a source of high memory usage.  Clear every 15 minutes to attempt to keep this under control.

See merge request !4
This commit is contained in:
Andrew Tomaka 2015-04-16 10:25:37 -04:00
commit 81d86b68fc

View file

@ -16,6 +16,7 @@ var botRaidTarget = null;
var botLastRandom = 0;
var botLastRaid = 0;
var botLastPurchase = 0;
var botLastChatClear = 0;
var botSleeping = false;
var botUser = null;
@ -142,6 +143,12 @@ function mainLoop() {
clickSelector('button[name="buymax-capturedminion"]');
}
}
//CLEAR CHAT
if(botTimestamp() > botLastChatClear + (15 * 60)) {
clickSelector('#chat_clear');
botLastChatClear = botTimestamp();
}
}
botDetectUser();