Advertisement
westor

TV Gids for Borreltje v2.0

Nov 13th, 2014
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 15.87 KB | None | 0 0
  1. ON *:TEXT:!tvgids:#: {
  2.   if (%tvgid_ [ $+ [ $chan ] ]) { return }
  3.   var %s = tvgids_ $+ $ticks $+ _ $+ $rand(1,1000000)
  4.   if ($sock(%s)) { sockclose }
  5.   .msg $chan [ $+ $nick $+ ]: TV Gids Nu & Straks
  6.   set -eu20 %tvgid_ [ $+ [ $chan ] ] $nick $ctime
  7.   sockopen %s www.veronicamagazine.nl 80
  8.   sockmark %s $nick $chan
  9. }
  10.  
  11. ON *:SOCKOPEN:tvgids_*: {
  12.   if ($sockerr) {
  13.     var %c = $gettok($sock($sockname).mark,2,32)
  14.     var %n = $gettok($sock($sockname).mark,1,32)
  15.     if ($me ison %c) { .msg %c [ $+ %n $+ ]: Error, There was an connection problem to the website! - (Error Code:  $+ $sock($sockname).wserr $+ ) - (Error Messsage:  $+ $sock($sockname).wsmsg $+ ) }
  16.     sockclose $sockname
  17.     return
  18.   }
  19.   sockwrite -nt $sockname GET /google-gadget/tab_nuoptv.php HTTP/1.1
  20.   sockwrite -n $sockname Host: $sock($sockname).addr
  21.   sockwrite -n $sockname Connection: keep-alive
  22.   sockwrite -nt $sockname $crlf
  23. }
  24.  
  25. ON *:SOCKREAD:tvgids_*: {
  26.   if ($sockerr) {
  27.     var %c = $gettok($sock($sockname).mark,2,32)
  28.     var %n = $gettok($sock($sockname).mark,1,32)
  29.     if ($me ison %c) { .msg %c [ $+ %n $+ ]: Error, There was an connection and reading problem to the website! - (Error Code:  $+ $sock($sockname).wserr $+ ) - (Error Messsage:  $+ $sock($sockname).wsmsg $+ ) }
  30.     sockclose $sockname
  31.     return
  32.   }
  33.   var %r
  34.   sockread %r
  35.   ; echo -a READ: %r
  36.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('NL1');">* iswm %r) {
  37.     var %station = $httpstrip(%r)
  38.     set -e %nl1_ [ $+ [ $sockname ] $+ ] _station %station
  39.     tokenize 32 $sock($sockname).mark
  40.     sockmark $sockname $1 $2 read
  41.   }
  42.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read) {
  43.     var %now = $httpstrip(%r)
  44.     set -e %nl1_ [ $+ [ $sockname ] $+ ] _now %now
  45.   }
  46.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read) {
  47.     var %later = $httpstrip(%r)
  48.     set -e %nl1_ [ $+ [ $sockname ] $+ ] _later %later
  49.   }
  50.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read) {
  51.     tokenize 32 $sock($sockname).mark
  52.     sockmark $sockname $1 $2
  53.     var %station = %nl1_ [ $+ [ $sockname ] $+ ] _station
  54.     var %now = %nl1_ [ $+ [ $sockname ] $+ ] _now
  55.     var %later = %nl1_ [ $+ [ $sockname ] $+ ] _later
  56.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  57.     unset %nl1_ [ $+ [ $sockname ] $+ ] _*
  58.   }
  59.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('NL2');">* iswm %r) {
  60.     var %station = $httpstrip(%r)
  61.     set -e %nl2_ [ $+ [ $sockname ] $+ ] _station %station
  62.     tokenize 32 $sock($sockname).mark
  63.     sockmark $sockname $1 $2 read2
  64.   }
  65.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read2) {
  66.     var %now = $httpstrip(%r)
  67.     set -e %nl2_ [ $+ [ $sockname ] $+ ] _now %now
  68.   }
  69.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read2) {
  70.     var %later = $httpstrip(%r)
  71.     set -e %nl2_ [ $+ [ $sockname ] $+ ] _later %later
  72.   }
  73.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read2) {
  74.     tokenize 32 $sock($sockname).mark
  75.     sockmark $sockname $1 $2
  76.     var %station = %nl2_ [ $+ [ $sockname ] $+ ] _station
  77.     var %now = %nl2_ [ $+ [ $sockname ] $+ ] _now
  78.     var %later = %nl2_ [ $+ [ $sockname ] $+ ] _later
  79.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  80.     unset %nl2_ [ $+ [ $sockname ] $+ ] _*
  81.   }
  82.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('NL3');">* iswm %r) {
  83.     var %station = $httpstrip(%r)
  84.     set -e %nl3_ [ $+ [ $sockname ] $+ ] _station %station
  85.     tokenize 32 $sock($sockname).mark
  86.     sockmark $sockname $1 $2 read3
  87.   }
  88.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read3) {
  89.     var %now = $httpstrip(%r)
  90.     set -e %nl3_ [ $+ [ $sockname ] $+ ] _now %now
  91.   }
  92.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read3) {
  93.     var %later = $httpstrip(%r)
  94.     set -e %nl3_ [ $+ [ $sockname ] $+ ] _later %later
  95.   }
  96.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read3) {
  97.     tokenize 32 $sock($sockname).mark
  98.     sockmark $sockname $1 $2
  99.     var %station = %nl3_ [ $+ [ $sockname ] $+ ] _station
  100.     var %now = %nl3_ [ $+ [ $sockname ] $+ ] _now
  101.     var %later = %nl3_ [ $+ [ $sockname ] $+ ] _later
  102.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  103.     unset %nl3_ [ $+ [ $sockname ] $+ ] _*
  104.   }
  105.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('RT4');">* iswm %r) {
  106.     var %station = $httpstrip(%r)
  107.     set -e %rt4_ [ $+ [ $sockname ] $+ ] _station %station
  108.     tokenize 32 $sock($sockname).mark
  109.     sockmark $sockname $1 $2 read4
  110.   }
  111.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read4) {
  112.     var %now = $httpstrip(%r)
  113.     set -e %rt4_ [ $+ [ $sockname ] $+ ] _now %now
  114.   }
  115.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read4) {
  116.     var %later = $httpstrip(%r)
  117.     set -e %rt4_ [ $+ [ $sockname ] $+ ] _later %later
  118.   }
  119.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read4) {
  120.     tokenize 32 $sock($sockname).mark
  121.     sockmark $sockname $1 $2
  122.     var %station = %rt4_ [ $+ [ $sockname ] $+ ] _station
  123.     var %now = %rt4_ [ $+ [ $sockname ] $+ ] _now
  124.     var %later = %rt4_ [ $+ [ $sockname ] $+ ] _later
  125.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  126.     unset %rt4_ [ $+ [ $sockname ] $+ ] _*
  127.   }
  128.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('NT5');">* iswm %r) {
  129.     var %station = $httpstrip(%r)
  130.     set -e %nt5_ [ $+ [ $sockname ] $+ ] _station %station
  131.     tokenize 32 $sock($sockname).mark
  132.     sockmark $sockname $1 $2 read5
  133.   }
  134.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read5) {
  135.     var %now = $httpstrip(%r)
  136.     set -e %nt5_ [ $+ [ $sockname ] $+ ] _now %now
  137.   }
  138.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read5) {
  139.     var %later = $httpstrip(%r)
  140.     set -e %nt5_ [ $+ [ $sockname ] $+ ] _later %later
  141.   }
  142.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read5) {
  143.     tokenize 32 $sock($sockname).mark
  144.     sockmark $sockname $1 $2
  145.     var %station = %nt5_ [ $+ [ $sockname ] $+ ] _station
  146.     var %now = %nt5_ [ $+ [ $sockname ] $+ ] _now
  147.     var %later = %nt5_ [ $+ [ $sockname ] $+ ] _later
  148.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  149.     unset %nt5_ [ $+ [ $sockname ] $+ ] _*
  150.   }
  151.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('SB6');">* iswm %r) {
  152.     var %station = $httpstrip(%r)
  153.     set -e %sb6_ [ $+ [ $sockname ] $+ ] _station %station
  154.     tokenize 32 $sock($sockname).mark
  155.     sockmark $sockname $1 $2 read6
  156.   }
  157.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read6) {
  158.     var %now = $httpstrip(%r)
  159.     set -e %sb6_ [ $+ [ $sockname ] $+ ] _now %now
  160.   }
  161.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read6) {
  162.     var %later = $httpstrip(%r)
  163.     set -e %sb6_ [ $+ [ $sockname ] $+ ] _later %later
  164.   }
  165.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read6) {
  166.     tokenize 32 $sock($sockname).mark
  167.     sockmark $sockname $1 $2
  168.     var %station = %sb6_ [ $+ [ $sockname ] $+ ] _station
  169.     var %now = %sb6_ [ $+ [ $sockname ] $+ ] _now
  170.     var %later = %sb6_ [ $+ [ $sockname ] $+ ] _later
  171.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  172.     unset %sb6_ [ $+ [ $sockname ] $+ ] _*
  173.   }
  174.  
  175.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('VER');">* iswm %r) {
  176.     var %station = $httpstrip(%r)
  177.     set -e %ver_ [ $+ [ $sockname ] $+ ] _station %station
  178.     tokenize 32 $sock($sockname).mark
  179.     sockmark $sockname $1 $2 read7
  180.   }
  181.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read7) {
  182.     var %now = $httpstrip(%r)
  183.     set -e %ver_ [ $+ [ $sockname ] $+ ] _now %now
  184.   }
  185.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read7) {
  186.     var %later = $httpstrip(%r)
  187.     set -e %ver_ [ $+ [ $sockname ] $+ ] _later %later
  188.   }
  189.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read7) {
  190.     tokenize 32 $sock($sockname).mark
  191.     sockmark $sockname $1 $2
  192.     var %station = %ver_ [ $+ [ $sockname ] $+ ] _station
  193.     var %now = %ver_ [ $+ [ $sockname ] $+ ] _now
  194.     var %later = %ver_ [ $+ [ $sockname ] $+ ] _later
  195.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  196.     unset %ver_ [ $+ [ $sockname ] $+ ] _*
  197.   }
  198.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('RT5');">* iswm %r) {
  199.     var %station = $httpstrip(%r)
  200.     set -e %rt5_ [ $+ [ $sockname ] $+ ] _station %station
  201.     tokenize 32 $sock($sockname).mark
  202.     sockmark $sockname $1 $2 read8
  203.   }
  204.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read8) {
  205.     var %now = $httpstrip(%r)
  206.     set -e %rt5_ [ $+ [ $sockname ] $+ ] _now %now
  207.   }
  208.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read8) {
  209.     var %later = $httpstrip(%r)
  210.     set -e %rt5_ [ $+ [ $sockname ] $+ ] _later %later
  211.   }
  212.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read8) {
  213.     tokenize 32 $sock($sockname).mark
  214.     sockmark $sockname $1 $2
  215.     var %station = %rt5_ [ $+ [ $sockname ] $+ ] _station
  216.     var %now = %rt5_ [ $+ [ $sockname ] $+ ] _now
  217.     var %later = %rt5_ [ $+ [ $sockname ] $+ ] _later
  218.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  219.     unset %rt5_ [ $+ [ $sockname ] $+ ] _*
  220.   }
  221.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('RT7');">* iswm %r) {
  222.     var %station = $httpstrip(%r)
  223.     set -e %rt7_ [ $+ [ $sockname ] $+ ] _station %station
  224.     tokenize 32 $sock($sockname).mark
  225.     sockmark $sockname $1 $2 read9
  226.   }
  227.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read9) {
  228.     var %now = $httpstrip(%r)
  229.     set -e %rt7_ [ $+ [ $sockname ] $+ ] _now %now
  230.   }
  231.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read9) {
  232.     var %later = $httpstrip(%r)
  233.     set -e %rt7_ [ $+ [ $sockname ] $+ ] _later %later
  234.   }
  235.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read9) {
  236.     tokenize 32 $sock($sockname).mark
  237.     sockmark $sockname $1 $2
  238.     var %station = %rt7_ [ $+ [ $sockname ] $+ ] _station
  239.     var %now = %rt7_ [ $+ [ $sockname ] $+ ] _now
  240.     var %later = %rt7_ [ $+ [ $sockname ] $+ ] _later
  241.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  242.     unset %rt7_ [ $+ [ $sockname ] $+ ] _*
  243.   }
  244.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('RT8');">* iswm %r) {
  245.     var %station = $httpstrip(%r)
  246.     set -e %rt8_ [ $+ [ $sockname ] $+ ] _station %station
  247.     tokenize 32 $sock($sockname).mark
  248.     sockmark $sockname $1 $2 read10
  249.   }
  250.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read10) {
  251.     var %now = $httpstrip(%r)
  252.     set -e %rt8_ [ $+ [ $sockname ] $+ ] _now %now
  253.   }
  254.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read10) {
  255.     var %later = $httpstrip(%r)
  256.     set -e %rt8_ [ $+ [ $sockname ] $+ ] _later %later
  257.   }
  258.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read10) {
  259.     tokenize 32 $sock($sockname).mark
  260.     sockmark $sockname $1 $2
  261.     var %station = %rt8_ [ $+ [ $sockname ] $+ ] _station
  262.     var %now = %rt8_ [ $+ [ $sockname ] $+ ] _now
  263.     var %later = %rt8_ [ $+ [ $sockname ] $+ ] _later
  264.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  265.     unset %rt8_ [ $+ [ $sockname ] $+ ] _*
  266.   }
  267.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('MTV');">* iswm %r) {
  268.     var %station = $httpstrip(%r)
  269.     set -e %mtv_ [ $+ [ $sockname ] $+ ] _station %station
  270.     tokenize 32 $sock($sockname).mark
  271.     sockmark $sockname $1 $2 read11
  272.   }
  273.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read11) {
  274.     var %now = $httpstrip(%r)
  275.     set -e %mtv_ [ $+ [ $sockname ] $+ ] _now %now
  276.   }
  277.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read11) {
  278.     var %later = $httpstrip(%r)
  279.     set -e %mtv_ [ $+ [ $sockname ] $+ ] _later %later
  280.   }
  281.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read11) {
  282.     tokenize 32 $sock($sockname).mark
  283.     sockmark $sockname $1 $2
  284.     var %station = %mtv_ [ $+ [ $sockname ] $+ ] _station
  285.     var %now = %mtv_ [ $+ [ $sockname ] $+ ] _now
  286.     var %later = %mtv_ [ $+ [ $sockname ] $+ ] _later
  287.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  288.     unset %mtv_ [ $+ [ $sockname ] $+ ] _*
  289.   }
  290.   if (*<div class="station"><a href="#top" onclick="selectStationOverview('CDY');">* iswm %r) {
  291.     var %station = $httpstrip(%r)
  292.     set -e %cdy_ [ $+ [ $sockname ] $+ ] _station %station
  293.     tokenize 32 $sock($sockname).mark
  294.     sockmark $sockname $1 $2 read12
  295.   }
  296.   if (*<div class="now">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read12) {
  297.     var %now = $httpstrip(%r)
  298.     set -e %cdy_ [ $+ [ $sockname ] $+ ] _now %now
  299.   }
  300.   if (*<div class="later">* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read12) {
  301.     var %later = $httpstrip(%r)
  302.     set -e %cdy_ [ $+ [ $sockname ] $+ ] _later %later
  303.   }
  304.   if (*<div style="clear: both;"></div>* iswm %r) && ($gettok($sock($sockname).mark,3,32) == read12) {
  305.     tokenize 32 $sock($sockname).mark
  306.     sockmark $sockname $1 $2
  307.     var %station = %cdy_ [ $+ [ $sockname ] $+ ] _station
  308.     var %now = %cdy_ [ $+ [ $sockname ] $+ ] _now
  309.     var %later = %cdy_ [ $+ [ $sockname ] $+ ] _later
  310.     if ($me ison $2) && (%station) { .msg $2 [ $+ $1 $+ ]: TV:  $+ %station $+  $iif(%now,-=- Now:  $+ $mid($removecs($v1,Nu:),2-) $+ ) $iif(%later,-=- Later:  $+ $v1 $+ ) }
  311.     unset %cdy_ [ $+ [ $sockname ] $+ ] _*
  312.     sockclose $sockname
  313.     return
  314.   }
  315. }
  316.  
  317. alias -l httpstrip {
  318.   var %xx = $replace($1-,&#x26;,$chr(38),$chr(124),-,$chr(125),-,&#125;,-,&#124;,-,&quot;,$chr(34),&amp;,&,&lt;,<,&gt;,>,&nbsp;,$chr(32),&#x26;#039;,$chr(39))
  319.   var %x = $remove(%xx,<![CDATA[,]]>,$chr(2),$chr(4),$chr(9),$chr(31),$chr(22),$chr(29),$chr(10),$chr(13))
  320.   var %i = $regsub(%x,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x)
  321.   return %x
  322. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement