Slightly better chat tracking (multi-user)

This commit is contained in:
Andrew Tomaka 2015-04-13 21:59:56 -04:00
parent caa997179c
commit 60b40bd394

4
bot.js
View file

@ -1,3 +1,4 @@
var botUsers = ['atomaka','greggnic'];
var botLoop;
var botGlobalBossTimer;
var botPaused = true;
@ -135,7 +136,8 @@ function chatIsPM(message) {
}
function chatHasName(message) {
return /atomaka/.exec(message.find('.message').text()) != null;
var string = message.find('.message').text();
return (new RegExp( '\\b' + botUsers.join('\\b|\\b') + '\\b')).test(string) === true;
}
function botTimestamp() {