mIRC Homepage
Posted By: TaraBabcock is op is not working for me. - 24/03/16 09:01 AM
OK, so do I have to add OPs manually for a twitch chat? I was under the impression that anyone who had mod status on my Twitch channel would already automatically be OP.

I tried this: /mode #Channel +o nick

It didn't do anything in either of my mIRC windows, or my Twitch chat window.

Basically any code with "if ($nick isop" doesn't work for me with my Twitch mods, and the adding command doesn't work either.

Here is some of my code:

Code:
on *:text:*:#:{
  if ($nick isop $chan) { halt }
  if ( $len($1-) >= 10 ) {
    if ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) {
      var %capsblock = $rand(1,3)
      if (%capsblock == 1) { msg $chan BIG LETTERS are for those with small penises, $nick ! [CAPS WARNING] }
      if (%capsblock == 2) { msg $chan $nick needs to stop YELLING! [CAPS WARNING] }
      if (%capsblock == 3) { msg $chan Stop attention whoring, $nick ! [CAPS WARNING] }
      { msg $chan /timeout $nick 30 }
    }
  }
}


and

Code:
on *:text:*.com*:#:{
  if ($nick isop #) { halt }
  msg $chan /timeout $nick 10
  msg $chan NO LINKS, $nick ! [LINK WARNING]
}


I have tried both # and $chan as well as halt and return and nothing works. I tried searching on here, but searching "nick is op" just brings up pretty much all posts ever.

Thanks! I've been at this for days trying to set up my bot and learn this language...
Posted By: Fonic_Artes Re: is op is not working for me. - 24/03/16 11:38 AM
You need to make sure that it's requesting from the server with

Code:
ON *:CONNECT: {
    raw CAP REQ :twitch.tv/membership
    raw CAP REQ :twitch.tv/commands
  }
}


This will populate the chatters list and if they are a mod in the channel then they'll be populated with mod status.
Posted By: Tezorian Re: is op is not working for me. - 29/03/16 05:51 PM
Note however, that twitch uses a delay for the joins/parts/opers.
Best way to get this "rule" to work, is to use ircv3 $msgtags.

It's a bit more work, but then you'll get the mod=1 or mod=0 with every line sent to the chat.
© mIRC Discussion Forums