mIRC Home    About    Download    Register    News    Help

Print Thread
#259111 06/10/16 03:29 AM
Joined: Dec 2015
Posts: 6
F
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
F
Joined: Dec 2015
Posts: 6
I have a chat bot set up and connected to a Twitch channel, and that works fine and dandy, all the commands work great. Except for one thing. I want the server mods to be able to input an on/off command and have the bot toggle, on/off respectively.
But it's not. Only I can target it with on/off and I'm not sure why. Anyone want to share some wisdom?
Code:
ON *:TEXT:!*:#: {
  tokenize 32 $strip($1-)
  var %not_nicks = BlueFireGaminz 360chrism, aalati
  if (!$istok(%not_nicks,$nick,32)) && (%commands_not) { msg $nick Sorry FiFiQuote is on Cooldown... Try again in $var(commands_not,1).secs seconds! | return }

  var %not_nicks_onoff = BlueFireGaminz 360chrism, aalati

  if ($1 == !off) && ($istok(%not_nicks_onoff,$nick,32)) { 
    if (%commands) { msg $chan Can't a QuoteBot get any sleep around here? }
    elseif (!%commands) { set %commands 1 }
  }
  if ($1 == !on) && ($istok(%not_nicks_onoff,$nick,32)) { 
    if (!%commands) { msg $chan Didn't you hear me? Was I not scary enough? }
    elseif (%commands) { unset %commands | msg $chan FiFiQuote is BACK! Fear me! FEAR ME!. }
  }

Joined: Dec 2015
Posts: 6
F
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
F
Joined: Dec 2015
Posts: 6
I think I solved it, for some reason removing the comas from the var %not_nicks_onoff = BlueFireGaminz 360chrism, aalati, string fixed it, I guess that Twitch doesn't need spacing in between the names.


Link Copied to Clipboard