Neo_Nemesis Admin
Posts: 86 Join date: 2010-10-04
 | Subject: YouTube Info Script - mIRC Thu Oct 14, 2010 4:24 am | |
| A simple YouTube info script I made for my bot. Triggered when someone posts a YouTube link in the channel. Intended for a channel bot. mIRC 6.35+ | Code: | ;YouTube Info 1.2 ;By Neo Nemesis alias youtube { %ytube1 = $remove($1,http://,www.,youtube,.com) sockopen youtube www.youtube.com 80 } on *:SOCKOPEN:youtube: { sockwrite -n $sockname GET %ytube1 HTTP/1.1 sockwrite -n $sockname Host: www.youtube.com sockwrite -n $sockname Connection: Keep-Alive sockwrite -n $sockname Content-Type: text/html sockwrite -n $sockname $crlf } on *:SOCKREAD:youtube: { sockread %ytube2 if (%ytube2 == $null) && (%sockread == $null) { msg %ytube3 1,0You0,4Tube15,1 Error receiving information. set %sockread 1 } elseif (%ytube2 == $null) && (%sockread != $null) { noop } elseif (<meta name="title" content=" isin %ytube2) { msg %ytube3 1,0You0,4Tube15,1 $remove(%ytube2,<meta name="title" content=",">,&quot;) } } on *:TEXT:*youtube*:#: { %ytube3 = $chan %ytube4 = 1 while ([ $chr(36) $+ [ %ytube4 ] ]) { if (www.youtube.com/watch?v= isin [ $chr(36) $+ [ %ytube4 ] ]) { sockclose youtube youtube [ $chr(36) $+ [ %ytube4 ] ] } inc %ytube4 } }
|
|
|