NoKz commented on a Page, Youtube Script (Parse Vids and Search) v6.5  -  May 28, 2016

First and foremost, AMAZING script. Thank you very much for it! Small question; I'm working on this for Twitch and I'm trying to limit it to Mods and subscribers only requesting links. But, I want it to announce links posted in chat for everyone. What do I need to insert to make this work? Thank you!

illhawkthat  -  May 28, 2016

Can you link to a screenshot of what the IRC chan that you run it in (of your twitch channel) looks like? I'm not sure how they distinguish between subscribers and mods on the backend.

NoKz  -  May 28, 2016

https://www.twitch.tv/crream

It's for a Twitch IRC Channel. I've found some stuff saying for subs, you check by calling "($hget(subscribers,$nick) = 1)"

NoKz  -  May 28, 2016

I got it working by adding:

   if ($nick isop #) || (subscriber=1 isin $msgtags) {

To the below entry in the script.

on $*:text:/^[!!]y(outube|t|tsearch|search|ousearch|outubesearch)(\s|$)/Si:#: {
 $iif($istok(%youtubefetch,$chan,44),halt,noop)
 $iif($istok(%nolinks,$nick,44),halt,noop)
   if ($nick isop #) || (subscriber=1 isin $msgtags) {
 if ($($+(%,botflood.,$nick),2)) {
 if ($($+(%,botflood.,$nick),2) >= 50) { 
      ignore -u60 $address($nick,2) 
      msg $chan $+($nick,$chr(44)) You have been put on ignore for 60secs for abusing the bot.
     ;halt 
    }
    elseif ($($+(%,botflood.,$nick),2) >= 40) { 
      msg $chan $+($nick,$chr(44)) Please do not flood the bot. 
      inc -z $+(%,botflood.,$nick) 20 
      halt 
    }
    else { inc -z $+(%,botflood.,$nick) 25 }
  }
  else { inc -z $+(%,botflood.,$nick) 25 }
  var %ticks $ticks

  if ($2) {
    if ($chan) {
      if (($left($strip($1),1) == !) && (%_youtube.notices != true)) { set $+(%,youtube.,%ticks,.msgtype) msg $chan }
      else { set $+(%,youtube.,%ticks,.msgtype) notice $nick }
    }
    else { set $+(%,youtube.,%ticks,.msgtype) msg $nick }
    set $+(%,youtube.,%ticks,.search) $2-
    set $+(%,youtube.,%ticks,.query) $urlencode($2-)
    sockopen -e $+(youtube.,%ticks) www.googleapis.com 443
  }
  elseif ($2 == $null) { 
    notice $nick Incorrect Syntax - Use $1 <search term> 
  }
}
}
illhawkthat  -  May 28, 2016

Great glad you got it working

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.