|
|
@ -74,7 +74,6 @@ function Currency(irc, db, options) { |
|
|
|
__self.config.subscribers_json = options.subscribers || ''; |
|
|
|
__self.config.website = options.website || ''; |
|
|
|
__self.config.modpowers = options.modpowers || false; |
|
|
|
__self.config.chatterbonus = options.chatterbonus || false; |
|
|
|
__self.config.ignorelist = options.ignorelist || ['jtv']; |
|
|
|
|
|
|
|
// general settings
|
|
|
@ -110,7 +109,6 @@ function Currency(irc, db, options) { |
|
|
|
__self.give_coins_timer = options.payrate || 30;//minutes
|
|
|
|
__self.subscriber_check = 4;//minutes
|
|
|
|
__self.subscribers = []; |
|
|
|
__self.active_list = []; |
|
|
|
|
|
|
|
// raffle settings
|
|
|
|
__self.raffle_status = false; |
|
|
@ -155,26 +153,6 @@ Currency.prototype.commands = function (data) { |
|
|
|
|
|
|
|
// broadcaster only commands
|
|
|
|
if (broadcaster_bot_initiated || (__self.config.modpowers && moderator_initiated)) { |
|
|
|
//toggle chatter bonus
|
|
|
|
if (data[4] == 'chatterbonus') { |
|
|
|
switch (data[5]) { |
|
|
|
case 'on': |
|
|
|
__self.config.chatterbonus = true; |
|
|
|
__self.irc.emit('message', {message:__self.pre_text + 'Chatter bonus is on! Earn extra potatoes by being active in the chat.'}); |
|
|
|
break; |
|
|
|
case 'off': |
|
|
|
__self.config.chatterbonus = false; |
|
|
|
__self.irc.emit('message', {message:__self.pre_text + 'Chatterbonus is now off. Potato deflation!'}); |
|
|
|
break; |
|
|
|
case 'status': |
|
|
|
if(!__self.config.chatterbonus) { |
|
|
|
__self.irc.emit('message', {message:__self.pre_text + 'Chatterbonus is: Off'}); |
|
|
|
} else { |
|
|
|
__self.irc.emit('message', {message:__self.pre_text + 'Chatterbonus is: On'}); |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
//open / close auction system
|
|
|
|
if (data[4] === 'auction') { |
|
|
|
switch (data[5]) { |
|
|
@ -745,9 +723,6 @@ Currency.prototype.handout_coins = function () { |
|
|
|
var sql = ''; |
|
|
|
for (var i = 0; i < __self.viewer_list.length; i++) { |
|
|
|
var currency_amount = __self.subscribers.indexOf(__self.viewer_list[i]) >= 0 ? 2 : 1; |
|
|
|
if (__self.config.chatterbonus){ |
|
|
|
if(active_list.indexOf(__self.viewer_list[i])) currency_amount++; |
|
|
|
} |
|
|
|
if (__self.viewer_list[i] !== '') { |
|
|
|
if (i != __self.viewer_list.length - 1) { |
|
|
|
sql += 'INSERT INTO viewers (user, points) '; |
|
|
@ -824,9 +799,6 @@ Currency.prototype.handout_coins = function () { |
|
|
|
__self.viewer_list.push(viewer); |
|
|
|
console.log("[*ADD NAME*] "+viewer+" from CHAT"); |
|
|
|
} |
|
|
|
if (__self.active_list.indexOf(viewer) < 0) { |
|
|
|
__self.active_list.push(viewer); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|