;alias yt { ; if (youtube.com/watch?v= isin $1-) { ; if (http:// isin $1-) %ytpath = / $+ $gettok($gettok($1-,3,47),1,38) ; else %ytpath = / $+ $gettok($gettok($1-,2,47),1,38) ; sockclose yt ; sockopen yt youtube.com 80 ; } ; else { ; echo -a $chr(91) $+ $time $+ $chr(93) YouTube: syntax error ; } ;} on *:text:*youtube.com/watch?v=*:*:{ if (http:// isin $1-) %ytpath = / $+ $gettok($gettok($1-,3,47),1,38) else %ytpath = / $+ $gettok($gettok($1-,2,47),1,38) %ytnick = $nick %ytchan = $chan sockclose yt sockopen yt youtube.com 80 } on *:sockopen:yt:{ if ($sockerr) { echo -a $chr(91) $+ $time $+ $chr(93) YouTube: socket error | halt } sockwrite -n $sockname GET %ytpath HTTP/1.1 sockwrite -n $sockname Host: youtube.com sockwrite -n $sockname $crlf } on *:sockread:yt: { :read ;sockread &temp ;bwrite yt.txt -1 -1 &temp sockread -f %ytread ; if (