Slightly better chat tracking (multi-user)
This commit is contained in:
parent
caa997179c
commit
60b40bd394
1 changed files with 3 additions and 1 deletions
4
bot.js
4
bot.js
|
@ -1,3 +1,4 @@
|
||||||
|
var botUsers = ['atomaka','greggnic'];
|
||||||
var botLoop;
|
var botLoop;
|
||||||
var botGlobalBossTimer;
|
var botGlobalBossTimer;
|
||||||
var botPaused = true;
|
var botPaused = true;
|
||||||
|
@ -135,7 +136,8 @@ function chatIsPM(message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function chatHasName(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() {
|
function botTimestamp() {
|
||||||
|
|
Loading…
Reference in a new issue