From 8116360d51a38e8b024167962f26fa7b57fe2990 Mon Sep 17 00:00:00 2001 From: Brandon Cornejo Date: Sun, 25 Jan 2015 16:05:36 -0600 Subject: [PATCH] status command and TWITCHNOTIFY --- lib/currency.js | 7 +++++++ lib/irc.js | 1 + 2 files changed, 8 insertions(+) diff --git a/lib/currency.js b/lib/currency.js index f85d6b3..f4bc5f9 100644 --- a/lib/currency.js +++ b/lib/currency.js @@ -352,6 +352,13 @@ Currency.prototype.commands = function (data) { if (broadcaster_bot_initiated || moderator_initiated) { // enable/disable currency requests switch (data[4]) { + case 'status': + if (__self.streaming) { + __self.irc.emit('message', {message:__self.pre_text + "Stream is online, " + __self.config.currency + " are being distributed!"}); + } else { + __self.irc.emit('message', {message:__self.pre_text + "Stream is offline :("}); + } + break; case 'on': if (!__self.auction_status && !__self.raffle_status) { __self.coin_toggle = false; diff --git a/lib/irc.js b/lib/irc.js index 892f371..737749b 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -204,6 +204,7 @@ IRC.prototype.connect = function () { __self.raw('PASS ' + __self.config.pass, true); __self.raw('NICK ' + __self.config.name); __self.raw('USER ' + __self.config.nick + ' ' + __self.config.nick + '.com ' + __self.config.nick + ' :' + __self.config.name); + __self.raw('TWITCHCLIENT 1'); }); // handle incoming socket data