Administrators chain Posted November 7, 2020 Administrators Report Share Posted November 7, 2020 ;;;; YOUTUBE DETECTION on $*:Text:/(^[\+-])ytdetect$|(http\x3a\/\/|www\.)(([\S]*youtube\.com[\S]+v\=)|(youtu\.be\/))([\S]{11})/Si:#: { if (!$sock(youtube)) && (!%youtube.flood) { sockopen -e youtube www.youtube.com 443 | sockmark youtube $+(#,>,$replace($nick,>,Guest_),>,$regml(4)) set -eu5 %youtube.flood on } } on $*:Action:/(^[\+-])ytdetect$|(https\x3a\/\/|www\.)(([\S]*youtube\.com[\S]+v\=)|(youtu\.be\/))([\S]{11})/Si:#: { if (!$sock(youtube)) && (!%youtube.flood) { sockopen -e youtube www.youtube.com 443 | sockmark youtube $+(#,>,$replace($nick,>,Guest_),>,$regml(4)) set -eu5 %youtube.flood on } } ;// YouTube Detector Socket (Video Information) // on *:sockopen:youtube: { ;echo -a $+(/watch?v=,$gettok($sock(youtube).mark,3,62)) sockwrite -n $sockname GET $+(/watch?v=,$gettok($sock(youtube).mark,3,62)) HTTP/1.0 sockwrite -n $sockname HOST: $+(www.youtube.com,:,443) $+ $str($crlf,2) } on *:sockread:youtube: { var %x | sockread %x if ($regex(%x,<meta\sname="title"\scontent="(.+)">)) { doecho $gettok($sock(youtube).mark,1,62)) $gettok($sock(youtube).mark,2,62)) $+ : YouTube Info: $replace($striphtml($regml(1)),&,&) sockclose sockname } } Quote Link to comment Share on other sites More sharing options...