Browse Source

status command and TWITCHNOTIFY

dev
Brandon Cornejo 10 years ago
parent
commit
8116360d51
  1. 7
      lib/currency.js
  2. 1
      lib/irc.js

7
lib/currency.js

@ -352,6 +352,13 @@ Currency.prototype.commands = function (data) {
if (broadcaster_bot_initiated || moderator_initiated) { if (broadcaster_bot_initiated || moderator_initiated) {
// enable/disable currency requests // enable/disable currency requests
switch (data[4]) { 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': case 'on':
if (!__self.auction_status && !__self.raffle_status) { if (!__self.auction_status && !__self.raffle_status) {
__self.coin_toggle = false; __self.coin_toggle = false;

1
lib/irc.js

@ -204,6 +204,7 @@ IRC.prototype.connect = function () {
__self.raw('PASS ' + __self.config.pass, true); __self.raw('PASS ' + __self.config.pass, true);
__self.raw('NICK ' + __self.config.name); __self.raw('NICK ' + __self.config.name);
__self.raw('USER ' + __self.config.nick + ' ' + __self.config.nick + '.com ' + __self.config.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 // handle incoming socket data

Loading…
Cancel
Save