on *:text:*youtube.com/watch*:*: { %url = $* ; this variable is parsed by an external addon. The $urlparse(%url).path command returns the only the path ; in the whole url sent to it. for example: sent http://www.google.com/images/firefox/fox1.gif you will recieve ; /images/firefox/fox1.gif only. I think I do this so that later when i use SOCKOPEN, i can say: ; sockwrite -nt $sockname GET %youtubepathurl HTTP/1.1 ; %youtubepathurl = $urlparse(%url).path ; close before opening O_o ; if ($sock(111111)) .sockclose 111111 sockopen 111111 youtube.com 80 ; make the window if not existing, set the initial message shown in the window ; if %tube != on { window @YouTube set %tube on echo @YouTube Info: YouTube window opened $day $+ , $date $+ , $time echo @YouTube ................................................................................................................................................. } ; this section is for queries. If a youtube video url is caught in a query it will show on the @YouTube ; window as a PM from $nick and will be written to youtube.txt as a PM from same $nick also ; if ($chan == $null) { echo @YouTube 4< $asctime(mm:dd:yyyy-HH:nn:ss) $+ 4> 4< $+ $network PM $+ 4> 4< $+ $nick $+ 4> $1- Title: %titles Description: %descs write youtube.txt < $+ $date $+ > < $+ $time $+ > < $+ $network $chan $+ > < $+ $nick $+ > $1- Title: %titles Description: %descs ; just testing something here: ; ; echo @YouTube 4< $asctime(mm:dd:yyyy-HH:nn:ss) $+ 4> 4< $+ $network PM $+ 4> 4< $+ $nick $+ 4> %url Title: %titles Description: %descs ; write youtube.txt < $+ $date $+ > < $+ $time $+ > < $+ $network $chan $+ > < $+ $nick $+ > %url Title: %titles Description: %descs ; This is the problem site ; unset %titles unset %descs ; unset %youtubepathurl ; unset %url } ; this is the section for channel related youtube url video matches. They will be listed ; with the channel info and network info instead of being labeled as a PM in the above section ; else { echo @YouTube 4< $asctime(mm:dd:yyyy-HH:nn:ss) $+ 4> 4< $+ $network $chan $+ 4> 4< $+ $nick $+ 4> $1- Title: %titles Description: %descs write youtube.txt < $+ $date $+ > < $+ $time $+ > < $+ $network $chan $+ > < $+ $nick $+ > $1- Title: %titles Description: %descs ; echo @YouTube 4< $asctime(mm:dd:yyyy-HH:nn:ss) $+ 4> 4< $+ $network $chan $+ 4> 4< $+ $nick $+ 4> %url Title: %titles Description: %descs ; write youtube.txt < $+ $date $+ > < $+ $time $+ > < $+ $network $chan $+ > < $+ $nick $+ > %url Title: %titles Description: %descs ; another problem area ; unset %titles unset %descs ; unset %youtubepathurl ; unset %url } } on *:close:@YouTube:{ set %tube off } on *:SOCKOPEN:111111: { sockwrite -nt $sockname GET %youtubepathurl HTTP/1.1 sockwrite -nt $sockname Host: youtube.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:111111: { ; if error, halt ; if ($sockerr) { msg %chan Socket Error: $sockname $+ . Error code: $sockerr Please inform $me of this error message. halt } else { var %sockreader sockread %sockreader ; get the title of the video from the raw html by parsing it through some tested regex ; if (*"video_title"* iswm %sockreader ) { noop $regex(%sockreader,/