Hi, just dropping this here to let you know.
The latest version of March 17 doesn't work for me. For some reason, neither +ytdetect nor YouTube links seem to correctly activate the script (or its "on TEXT" part respectively), but there are no error messages whatsoever.
The older one I've been using still works just fine (though it only does so correctly with %LinkDetectorForYoutubeChanList set to # but not with single $network#$chan entries. I've tried either way as well with the newer version to no avail). The date on the working script's file says December 14 2012.
Yea, I had tried that before, realizing that the variable wasn't supposed to look the way it does. The original variable's name is %action and somehow it became ¬tion in the script above - but correcting it doesn't change anything. This newer version of the script still doesn't work for me, when all I do is copy&paste it (and change the variable in those 3 lines).
Thanks for trying to help though!
When you view the 'Variables' page... is something like this in it > %LinkDetectorForYoutubeChanList Torn#i if not, maybe you could try adding the channels manually, just until you can get the +/-ytdetect to work. Also, you do have OP status or above in the channel, right? It won't work for the +/-ytdetect if you don't.
Try this:
On *:sockread:LinkDetectorForYoutube*: {
if ($sockerr) { sockclose $sockname | return }
else {
var %LinkDetectorForYoutube | sockread %LinkDetectorForYoutube
if ($regex(%LinkDetectorForYoutube,/<span class="likes-count">(.*?)</span>/i)) {
hadd $sockname likes $+($hget($sockname,tagcolor),Likes:) $+($hget($sockname,textcolor),$regml(1))
}
elseif ($regex(%LinkDetectorForYoutube,/<span class="dislikes-count">(.*?)</span>/i)) {
hadd $sockname dislikes $+($hget($sockname,tagcolor),Disikes:) $+($hget($sockname,textcolor),$regml(1))
}
elseif (<span class="watch-view-count"> isin %LinkDetectorForYoutube) {
hadd $sockname viewsFound 1
if ($regex(%linkdetectorforyoutube,/\/user\/([^\/]+)\/videos/i)) {
hadd $sockname uploader $+($hget($sockname,tagcolor),Uploader:) $+($hget($sockname,textcolor),$regml(1))
}
}
elseif ($hget($sockname,viewsFound)) {
hadd $sockname viewsFound 0
hadd $sockname views $+($hget($sockname,tagcolor),Views:) $+($hget($sockname,textcolor),$remove(%LinkDetectorForYoutube,<strong>,</strong>))
}
elseif (($regex(%LinkDetectorForYoutube,/dir="ltr">(.*?)<\/a><span class="yt-user-separator">/i))) {
hadd $sockname uploader $+($hget($sockname,tagcolor),Uploader:) $+($hget($sockname,textcolor),$regml(1))
hadd $sockname date $+($hget($sockname,tagcolor),Upload Date:) $+($hget($sockname,textcolor),$regml(2))
}
elseif (($regex(%LinkDetectorForYoutube,/watch-video-date"\s>(.*?)<\/span>/i))) {
hadd $sockname date $+($hget($sockname,tagcolor),Upload Date:) $+($hget($sockname,textcolor),$regml(1))
if ($hget($sockname,tags)) $gettok($sock($sockname).mark,1-2,32) $hget($sockname,logo) $Xchr($regsubex($v1,/([\S]+)/g,$hget($sockname,\t)))
if ($hget($sockname)) hfree $sockname
sockclose $sockname
}
elseif ($regex(%LinkDetectorForYoutube,/class="watch-video-date"\s>(.*?)<\/span>/)) {
hadd $sockname date $+($hget($sockname,tagcolor),Upload Date:) $+($hget($sockname,textcolor),$regml(1))
}
elseif ($regex(%LinkDetectorForYoutube,/class="long-title".*title="(.*?)">/)) {
hadd $sockname title $+($hget($sockname,tagcolor),Title:) $+($hget($sockname,textcolor),$regml(1))
}
elseif ($regex(%LinkDetectorForYoutube,/<meta\sname="title"\scontent="(.*?)">/)) {
hadd $sockname title $+($hget($sockname,tagcolor),Title:) $+($hget($sockname,textcolor),$regml(1))
}
}
}
[6:45pm] <~Stewie> http://www.youtube.com/watch?v=kHeMck0Ap3I
[6:46pm] <&thunderbolt> YouTube Title: Amaranthe -Razorblade Views: 1,583 Likes: 19 Disikes: 1 Uploader: Luis Manuel Oviedo Vizcaya Upload Date: 23 Mar 2013
Try this... there is a slight error in lines 29, 30 and 31 with the variables.
It worked for me when I changed it. > [7:18pm] <~Stewie> +ytdetect
[7:18pm] <&thunderbolt> Stewie #i is already running the LinkDetectorForYoutube script