From 6b1a8b893c4e4a7d858e9b9daa27b0b871a13be7 Mon Sep 17 00:00:00 2001 From: Brandon Cornejo Date: Tue, 4 Mar 2014 14:59:02 -0600 Subject: [PATCH] Clean up. --- lib/currency.js | 28 ---------------------------- lib/initialize.js | 1 - 2 files changed, 29 deletions(-) diff --git a/lib/currency.js b/lib/currency.js index 144101e..b612637 100644 --- a/lib/currency.js +++ b/lib/currency.js @@ -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); - } } }); diff --git a/lib/initialize.js b/lib/initialize.js index 7169986..6382a24 100644 --- a/lib/initialize.js +++ b/lib/initialize.js @@ -36,7 +36,6 @@ exports.initialize = function(options) { subscribers : config.twitch.subscribers, website : config.currency.website, modpowers : config.currency.modpowers, - chatterbonus: config.currency.chatterbonus, ignorelist : config.ignorelist }); web = require('./web.js')(db, {