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!
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>
}
}
}
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.