Advertisement
Niko_boy

Untitled

Dec 25th, 2011
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. ;YouTube Info 1.2
  2. ;By Neo Nemesis
  3.  
  4. alias youtube {
  5. %ytube1 = $remove($1,http://,www.,youtube,.com)
  6. sockopen youtube www.youtube.com 80
  7. }
  8. on *:SOCKOPEN:youtube: {
  9. sockwrite -n $sockname GET %ytube1 HTTP/1.1
  10. sockwrite -n $sockname Host: www.youtube.com
  11. sockwrite -n $sockname Connection: Keep-Alive
  12. sockwrite -n $sockname Content-Type: text/html
  13. sockwrite -n $sockname $crlf
  14. }
  15. on *:SOCKREAD:youtube: {
  16. sockread %ytube2
  17. if (%ytube2 == $null) && (%sockread == $null) {
  18. msg %ytube3 1,0You0,4Tube15,1 Error receiving information.
  19. set %sockread 1
  20. }
  21. elseif (%ytube2 == $null) && (%sockread != $null) { noop }
  22. elseif (<meta name="title" content=" isin %ytube2) {
  23. msg %ytube3 1,0You0,4Tube15,1 $remove(%ytube2,<meta name="title" content=",">,&amp;quot;)
  24. }
  25. }
  26. on *:TEXT:*youtube*:#: {
  27. %ytube3 = $chan
  28. %ytube4 = 1
  29. while ([ $chr(36) $+ [ %ytube4 ] ]) {
  30. if (www.youtube.com/watch?v= isin [ $chr(36) $+ [ %ytube4 ] ]) {
  31. sockclose youtube
  32. youtube [ $chr(36) $+ [ %ytube4 ] ]
  33. }
  34. inc %ytube4
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement