mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2016
Posts: 3
Self-satisified door
OP Offline
Self-satisified door
Joined: Mar 2016
Posts: 3
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...

Last edited by TaraBabcock; 24/03/16 09:02 AM.

Tara Babcock (mIRC Noob)
www.twitch.tv/tarababcock
Joined: Jun 2015
Posts: 84
F
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
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.

Joined: Nov 2003
Posts: 27
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Nov 2003
Posts: 27
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.


Link Copied to Clipboard