mIRC DeluXe Forum

Home forum for mIRC DeluXe - Under Construction
 
HomeCalendarFAQSearchRegisterLog in

Share | 
 

 YouTube Info Script - mIRC

View previous topic View next topic Go down 
AuthorMessage
Neo_Nemesis
Admin


Posts: 86
Join date: 2010-10-04

PostSubject: 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=",">,&amp;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
  }
}
Back to top Go down
http://mirc-deluxe.userboard.net
 

YouTube Info Script - mIRC

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Te TE Boj Unban ScRiPt NE Me Pak Se 2 Sekonda
» WWE videos on youtube
» Off-site youtube subscribe buttons!
» Kiefer Sutherland YouTube Video
» ***Info***

Permissions in this forum:You cannot reply to topics in this forum
mIRC DeluXe Forum :: Snippet Library-