Advertisement
SRU

TVRage 10-Minute-Prior Quick Schedule Announcer (SRU EDiT)

SRU
Oct 24th, 2011
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 4.24 KB | None | 0 0
  1. ;*** Orignal downloaded from: http://www.hawkee.com/snippet/7667/ ( Written by: http://www.hawkee.com/profile/39642/ )
  2. alias -l setautofiles {
  3.   if $isfile(AutoTimeToday.txt) { var %x 1 | while ($read(AutoTimeToday.txt,%x)) { $+(.timer,$v1) off | inc %x } }
  4.   if $isfile(AutoTimeToday.txt) {  echo 4 -a * Auto 10-Minute-Prior TV Show Announcer Has Been Turned On!
  5.     var %x 1 | while ($read(AutoTimeToday.txt,%x)) { $+(.timer,$v1) $v1 1 1 .play $+(-t,$v1) # AutoShowToday.txt | inc %x }
  6.   }
  7. }
  8. ;**********************************************************************************************************************************
  9. on *:sockopen:tvqauto:{
  10.   var %tvqauto sockwrite -n tvqauto
  11.   %tvqauto GET /tools/quickschedule.php HTTP/1.1
  12.   %tvqauto Host: services.tvrage.com
  13.   %tvqauto $crlf
  14. }
  15. ;**********************************************************************************************************************************
  16. on *:sockread:tvqauto:{ var %tvqinfoauto | sockread %tvqinfoauto
  17.   ;**********************************************************************************************************************************
  18.   if $regex(%tvqinfoauto,/\[TIME\](.*)\[\/TIME\]/i) { set -u7 %sTiME $asctime($ctime($date $regml(1)),HH:nn)
  19.     var %time $asctime($calc($ctime($date $regml(1)) - 600),HH:nn)
  20.     write AutoShowToday.txt $+([,%time,])
  21.     write AutoShowToday.txt 5Airing in the next 10 minutes ->
  22.     write AutoTimeToday.txt %time
  23.   }
  24.   ;**********************************************************************************************************************************
  25.   elseif $regex(%tvqinfoauto,/\[SHOW\](.*)\[\/SHOW\]/i) {
  26.     ;**********************************************************************************************************************************
  27.     set -u3 %tvqinfoauto_NetW $remove($mid(%tvqinfoauto,$pos(%tvqinfoauto,]),$calc($pos(%tvqinfoauto,^,1) -$pos(%tvqinfoauto,],1))),])
  28.     set -u3 %tvqinfoauto_TiTLE $remove($mid(%tvqinfoauto,$pos(%tvqinfoauto,^,1),$calc($pos(%tvqinfoauto,^,2) -$pos(%tvqinfoauto,^,1))),^)
  29.     set -u3 %tvqinfoauto_EP $remove($mid(%tvqinfoauto,$pos(%tvqinfoauto,^,2),$calc($pos(%tvqinfoauto,^,3) -$pos(%tvqinfoauto,^,2))),^)
  30.     set -u3 %tvqinfoauto_LiNK $remove($mid(%tvqinfoauto,$pos(%tvqinfoauto,^,3),$calc($pos(%tvqinfoauto,[,2) -$pos(%tvqinfoauto,^,3))),^)
  31.     ;**********************************************************************************************************************************
  32.     ;*** Output / How it spits out the iNFO
  33.     set -u3 %tvqinfoauto_SHOW $iif(%sTiME,$+(4,[14,$v1,4])) $+(15,%tvqinfoauto_TiTLE,) 14-4#14- $+(14,$replace(%tvqinfoauto_EP,x,15x14),) 14-4#14- $+(8,%tvqinfoauto_NetW,) $+(,$chr(40),2,%tvqinfoauto_LiNK,,$chr(41),)
  34.     ;**********************************************************************************************************************************
  35.     write AutoShowToday.txt %tvqinfoauto_SHOW
  36.   }
  37.   ;**********************************************************************************************************************************
  38.   elseif $regex(%tvqinfoauto,/\[DAY\](.*)\[\/DAY\]/i) { write AutoShowToday.txt $regml(1)
  39.     write $+(-d,$lines(AutoShowToday.txt)) AutoShowToday.txt
  40.     if (($date(dd) = 30 && $chr(44) 31 !isin %xauto)) { set %xauto , 01 }
  41.     $iif(%xauto isin %tvqinfoauto,sockclose tvqauto)
  42.   }
  43.   ;**********************************************************************************************************************************
  44. }
  45. menu * {
  46.   -
  47.   Enable Auto Announcer {
  48.     $iif($isfile(AutoTimeToday.txt),write -c AutoTimeToday.txt)
  49.     $iif($isfile(AutoShowToday.txt),write -c AutoShowToday.txt)
  50.     sock $+ $iif($sock(tvqauto),close,open) tvqauto services.tvrage.com 80
  51.     if ($date(dd) = 31) set -u5 %xauto , 01
  52.     else {
  53.       set -u5 %xauto $right($date(dd),1)
  54.       set -u5 %xauto $+($left($date(mm),1),$calc(%xauto +1))
  55.       .timerxauto 1 1 setautofiles
  56.     }
  57.   }
  58.   Disable Auto Announcer {
  59.     if $isfile(AutoTimeToday.txt) { echo 4 -a * Auto Announcer Has Been Switched Off!
  60.       var %x 1 | while ($read(AutoTimeToday.txt,%x)) { $+(.timer,$v1) off | inc %x }
  61.       $iif($isfile(AutoShowToday.txt),.remove AutoShowToday.txt)
  62.       $iif($isfile(AutoTimeToday.txt),.remove AutoTimeToday.txt)
  63.     }
  64.   }
  65.   -
  66. }
  67.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement