Advertisement
SRU

TVRage (No schedule)

SRU
Mar 30th, 2013
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 36.58 KB | None | 0 0
  1. ;*** TVRage - "Original" code by Gecko321 (www.mirc.net/projects.php?go=1204694830) *** SRU EDiT - Downloaded from: http://www.hawkee.com/snippet/9506/
  2. on *:LOAD:dialog -m TVSettings TVSettings -4
  3. on *:UNLOAD:.unset %TV_*
  4. menu Channel,Status,Menubar,Query {
  5.   -
  6.   $iif(%TV_Rage = 1,$style(1)) TVRage $+($chr(40),$iif(%TV_Rage = 1,Enabled,Disabled),$chr(41))
  7.   .Settings:dialog -m TVSettings TVSettings -4
  8.   .Self Search:dialog -m SelfSearch SelfSearch -4
  9.   .-
  10.   .Turn $iif(%TV_Rage != 1,on,off) :$iif(%TV_Rage != 1,%TV_Rage = 1,%TV_Rage = 0) | $iif(!%TV_Where,%TV_Where = 1) | $iif(!%TV_Where2,%TV_Where2 = 0) | $iif(!%TV_Color,%TV_Color = 1) | echo -at 14TVRage Has been $iif(%TV_Rage = 1,9enabled,4disabled)
  11.   -
  12. }
  13. on @*:TEXT:*:#: { if ($left($strip($1),1) == !) || ($left($strip($1),1) == .) || ($left($strip($1),1) == @) && (($mid($strip($1),2,4) == SHOW && $len($strip($1)) == 5) || ($mid($strip($1),2,2) == TV && $len($strip($1)) == 3) || ($mid($strip($1),2,2) == EP && $len($strip($1)) == 3) || ($mid($strip($1),2,1) == N && $len($strip($1)) == 2) || ($mid($strip($1),2,4) == Next && $len($strip($1)) == 5) || ($mid($strip($1),2,1) == L && $len($strip($1)) == 2) || ($mid($strip($1),2,4) == Last && $len($strip($1)) == 5)) && (!$timer($+(SPAM,$network,$nick))) { .timer $+ $+(SPAM,$network,$nick) 1 3 noop | mTVRage $strip($1-) } }
  14. on @*:INPUT:#: {
  15.   if ($left($strip($1),1) == !) || ($left($strip($1),1) == .) || ($left($strip($1),1) == @) && (($mid($strip($1),2,4) == SHOW && $len($strip($1)) == 5) || ($mid($strip($1),2,2) == TV && $len($strip($1)) == 3) || ($mid($strip($1),2,2) == EP && $len($strip($1)) == 3) || ($mid($strip($1),2,1) == N && $len($strip($1)) == 2) || ($mid($strip($1),2,1) == L && $len($strip($1)) == 2)) && (%TV_Rage == 1) { var %num = $trnum
  16.     if ($Target !ischan) { set %TVRage_Target. [ $+ [ %num ] ] $me | set %TVRage_Query. [ $+ [ %num ] ] 1 }
  17.     else { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where = 1,$Target,$me) }
  18.     set %TVRage_Chan. [ $+ [ %num ] ] $chan | set %TVRage_Nick. [ $+ [ %num ] ] $me
  19.     TVRage.Load %num $1-
  20.   }
  21. }
  22. alias mTVRage {
  23.   ;*** Not turned on
  24.   if (%TV_Rage == 0) { halt }
  25.   ;************************************************************
  26.   var %num = $trnum | set -u17 %TVRage_TargetC. [ $+ [ %num ] ] # | set %TVRage_Nick. [ $+ [ %num ] ] $nick | set %TVRage_Chan. [ $+ [ %num ] ] $chan
  27.   ;************************************************************************************************************************************
  28.   if ($Target !ischan) || (Trigger isin $1-2) { set %TVRage_Target. [ $+ [ %num ] ] $nick | set %TVRage_Query. [ $+ [ %num ] ] 1 }
  29.   else { set -u17 %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where = 1,$chan,$nick) }
  30.   ;************************************************************************************************************************************
  31.   ;*** !TV TRiGGER / CMDS / HELP / COMMANDs
  32.   if (($2 = TRIGGERs) || ($2 == CMDS) || ($2 == HELP) || ($2 == COMMANDs)) && (!$3) { var %X $r(1,2), %O $left($strip($1),1) | var %Y $iif($r(1,2) == 1,Dexter,$iif($r(1,2) == 1,House,$iif($r(1,2) == 1,Black Books,$iif($r(1,2) == 1,Blue Mountain State,$iif($r(1,2) == 1,Ideal,$iif($r(1,2) == 1,Community,$iif($r(1,2) == 1,The IT Crowd,$iif($r(1,2) == 1,My Name is Earl,$iif($r(1,2) == 1,Chuck,$iif($r(1,2) == 1,FlashForward,$iif($r(1,2) == 1,White Collar,$iif($r(1,2) == 1,Heroes,$iif($r(1,2) == 1,MythBusters,$iif($r(1,2) == 1,Top Gear,$iif($r(1,2) == 1,Psych,$iif($r(1,2) == 1,Breaking Bad,$iif($r(1,2) == 1,Weeds,$iif($r(1,2) == 1,HiMYM,How I Met Your Mother)))))))))))))))))) | var %Z $iif($r(1,2) == 1,Black Books,$iif($r(1,2) == 1,Blue Mountain State,$iif($r(1,2) == 1,Community,$iif($r(1,2) == 1,Ideal,$iif($r(1,2) == 1,Dexter,$iif($r(1,2) == 1,House,$iif($r(1,2) == 1,The IT Crowd,$iif($r(1,2) == 1,My Name is Earl,$iif($r(1,2) == 1,Chuck,$iif($r(1,2) == 1,FlashForward,$iif($r(1,2) == 1,White Collar,$iif($r(1,2) == 1,Heroes,$iif($r(1,2) == 1,MythBusters,$iif($r(1,2) == 1,Top Gear,$iif($r(1,2) == 1,Psych,$iif($r(1,2) == 1,Breaking Bad,$iif($r(1,2) == 1,Weeds,$iif($r(1,2) == 1,HiMYM,How I Met Your Mother)))))))))))))))))) | var %C $iif($r(1,2) == 1,Ideal,$iif($r(1,2) == 1,The IT Crowd,$iif($r(1,2) == 1,My Name is Earl,$iif($r(1,2) == 1,Chuck,$iif($r(1,2) == 1,FlashForward,$iif($r(1,2) == 1,White Collar,$iif($r(1,2) == 1,Heroes,$iif($r(1,2) == 1,MythBusters,$iif($r(1,2) == 1,Top Gear,$iif($r(1,2) == 1,Psych,$iif($r(1,2) == 1,Breaking Bad,$iif($r(1,2) == 1,Dexter,$iif($r(1,2) == 1,House,$iif($r(1,2) == 1,Black Books,$iif($r(1,2) == 1,Blue Mountain State,$iif($r(1,2) == 1,Community,$iif($r(1,2) == 1,Weeds,$iif($r(1,2) == 1,HiMYM,How I Met Your Mother)))))))))))))))))) | msg %TVRage_Target. [ $+ [ %num ] ] 4- $+(3,%O,SHOW) 4<3Show4> 5EX: $+(%O,SHOW) %Y 15ooO( Get show description 15) | msg %TVRage_Target. [ $+ [ %num ] ] 4- $+(3,$iif(%X == 1,$+(%O,NEXT) 15/ $+(3,%O,LAST),$+(,%O,N) 15/ $+(3,%O,L)) 4<3Show4>) 5EX: $iif(%X == 1,$+(%O,NEXT) %Z 15/ $+(%O,LAST),$+(%O,N) %Z 15/ $+(%O,L)) %Z 15ooO( Get information for next 15/ last episode 15) | msg %TVRage_Target. [ $+ [ %num ] ] 4- $+(3,$iif($1 == $+(%O,EP),$v2,$+(%O,TV))) 4<3Show4> (3Season and Episode4) 5EX: $iif($1 == $+(%O,EP),$v2,$+(%O,TV)) %C $+($r(1,3),x0,$r(1,5)) 15ooO( Get general show information and episode summary (if season and episode is given) 15) | msg %TVRage_Target. [ $+ [ %num ] ] 4- 4NOTE: Options in 4( ) are optional... and options in 4< > are required. | .unset %Y %Z %C %TVRage* [ $+ [ %num ] ] | halt }
  33.   elseif  (!$2) { var %X $r(1,2), %O $left($strip($1),1) | var %Y $iif($r(1,2) == 1,Dexter,$iif($r(1,2) == 1,House,$iif($r(1,2) == 1,Black Books,$iif($r(1,2) == 1,Blue Mountain State,$iif($r(1,2) == 1,Ideal,$iif($r(1,2) == 1,Community,$iif($r(1,2) == 1,The IT Crowd,$iif($r(1,2) == 1,My Name is Earl,$iif($r(1,2) == 1,Chuck,$iif($r(1,2) == 1,FlashForward,$iif($r(1,2) == 1,White Collar,$iif($r(1,2) == 1,Heroes,$iif($r(1,2) == 1,MythBusters,$iif($r(1,2) == 1,Top Gear,$iif($r(1,2) == 1,Psych,$iif($r(1,2) == 1,Breaking Bad,$iif($r(1,2) == 1,Weeds,$iif($r(1,2) == 1,HiMYM,How I Met Your Mother)))))))))))))))))) | var %Z $iif($r(1,2) == 1,Black Books,$iif($r(1,2) == 1,Blue Mountain State,$iif($r(1,2) == 1,Community,$iif($r(1,2) == 1,Ideal,$iif($r(1,2) == 1,Dexter,$iif($r(1,2) == 1,House,$iif($r(1,2) == 1,The IT Crowd,$iif($r(1,2) == 1,My Name is Earl,$iif($r(1,2) == 1,Chuck,$iif($r(1,2) == 1,FlashForward,$iif($r(1,2) == 1,White Collar,$iif($r(1,2) == 1,Heroes,$iif($r(1,2) == 1,MythBusters,$iif($r(1,2) == 1,Top Gear,$iif($r(1,2) == 1,Psych,$iif($r(1,2) == 1,Breaking Bad,$iif($r(1,2) == 1,Weeds,$iif($r(1,2) == 1,HiMYM,How I Met Your Mother)))))))))))))))))) | var %C $iif($r(1,2) == 1,Ideal,$iif($r(1,2) == 1,The IT Crowd,$iif($r(1,2) == 1,My Name is Earl,$iif($r(1,2) == 1,Chuck,$iif($r(1,2) == 1,FlashForward,$iif($r(1,2) == 1,White Collar,$iif($r(1,2) == 1,Heroes,$iif($r(1,2) == 1,MythBusters,$iif($r(1,2) == 1,Top Gear,$iif($r(1,2) == 1,Psych,$iif($r(1,2) == 1,Breaking Bad,$iif($r(1,2) == 1,Dexter,$iif($r(1,2) == 1,House,$iif($r(1,2) == 1,Black Books,$iif($r(1,2) == 1,Blue Mountain State,$iif($r(1,2) == 1,Community,$iif($r(1,2) == 1,Weeds,$iif($r(1,2) == 1,HiMYM,How I Met Your Mother)))))))))))))))))) | msg %TVRage_Target. [ $+ [ %num ] ] 4- $+(3,%O,SHOW) 4<3Show4> 5EX: $+(%O,SHOW) %Y 15ooO( Get show description 15) | msg %TVRage_Target. [ $+ [ %num ] ] 4- $+(3,$iif(%X == 1,$+(%O,NEXT) 15/ $+(3,%O,LAST),$+(,%O,N) 15/ $+(3,%O,L)) 4<3Show4>) 5EX: $iif(%X == 1,$+(%O,NEXT) %Z 15/ $+(%O,LAST),$+(%O,N) %Z 15/ $+(%O,L)) %Z 15ooO( Get information for next 15/ last episode 15) | msg %TVRage_Target. [ $+ [ %num ] ] 4- $+(3,$iif($1 == $+(%O,EP),$v2,$+(%O,TV))) 4<3Show4> (3Season and Episode4) 5EX: $iif($1 == $+(%O,EP),$v2,$+(%O,TV)) %C $+($r(1,3),x0,$r(1,5)) 15ooO( Get general show information and episode summary (if season and episode is given) 15) | msg %TVRage_Target. [ $+ [ %num ] ] 4- 4NOTE: Options in 4( ) are optional... and options in 4< > are required. | .unset %Y %Z %C %TVRage* [ $+ [ %num ] ] | halt }
  34.   ;************************************************************************************************************************************
  35.   ;*** !N / !NEXT
  36.   elseif ($1 == !N) || ($1 == !NEXT) { set -u17 %TVRage_ONLY. [ $+ [ %num ] ] NEXT }
  37.   ;*** !L / !LAST
  38.   elseif ($1 == !L) || ($1 == !LAST) { set -u17 %TVRage_ONLY. [ $+ [ %num ] ] LAST }
  39.   ;*** !SHOW / !SUMMARY
  40.   elseif ($1 == !SHOW) { set -u17 %TVRage_ONLY. [ $+ [ %num ] ] SHOW }
  41.   ;************************************************************************************************************************************
  42.   TVRage.Load %num $iif(%TVRage_Schedule. [ $+ [ %num ] ],$v1,$replace($1-,BMS,Blue Mountain State,HiMYM,How I Met Your Mother,TUT,The Ultimate Fighter,DH,Desperate Housewives,A23,Don't Trust the B---- in Apartment 23))
  43. }
  44. alias -l TVRage.Load { var %num = $1 | $iif($CheckEP(%num,$3-) = 1,set %TVRage_Type. [ $+ [ %num ] ] EPSpec,$iif($2 == !SHOW,set %TVRage_Type. [ $+ [ %num ] ] SHOW,set %TVRage_Type. [ $+ [ %num ] ] Ep)) | TVRage %num $3- }
  45. alias -l TVRage {
  46.   if ((%TVRage_Type. [ $+ [ $1 ] ] != Schedule) && (!$2)) { msg %TVRage_Target. [ $+ [ $1 ] ] Hmmm... you actually need to search for a TV-Show you know! 5Type: !TV Triggers 5for more help | .unset %TVRage_*. [ $+ [ $1 ] ] | return }
  47.   elseif (%TVRage_Type. [ $+ [ $1 ] ] = EPSpec) { %tvshow. [ $+ [ $1 ] ] = $+($replace($GetTok($2-,1- [ $Calc($numtok($2-,32)-1) ] ,32),$chr(32),% $+ 20),&ep=,%Check_Season. [ $+ [ $1 ] ],x,%Check_EP. [ $+ [ $1 ] ]) }
  48.   else { %TVShow. [ $+ [ $1 ] ] = $replace($2-,$chr(32),% $+ 20) }
  49.   sockopen TVRage. [ $+ [ $1 ] ] services.tvrage.com 80
  50. }
  51. ;*** BetterDuration (renamed LongTime+ here) *** Downloaded from: http://www.nealirc.org/IRC/mIRC.html
  52. alias LongTime+ { var %lifeseconds = $abs($1) | var %age, %years, %days, %hours, %minutes, %seconds, %temp | %years = $int($calc(%lifeseconds / 31557600)) | if (%years != 0) { %age = $+(15,%years,14year,$iif(%years > 1,s)) } | %temp = $calc(%lifeseconds - (%years * 31557600)) | %days = $int($calc(%temp / 86400)) | if (%days != 0) { %age = %age $+(15,%days,14day,$iif(%days > 1,s)) } | %temp = $calc(%temp - (%days * 86400)) | %hours = $int($calc(%temp / 3600)) | if (%hours != 0) { %age = %age $+(15,%hours,14hour,$iif(%hours > 1,s)) } | %temp = $calc(%temp - (%hours * 3600)) | %minutes = $int($calc(%temp / 60)) | if (%minutes != 0) { %age = %age $+(15,%minutes,14minute,$iif(%minutes > 1,s)) } | %seconds = $calc(%temp % 60) | if (%seconds != 0) { %age = %age $+(15,%seconds,14second,$iif(%seconds > 1,s)) } | return $iif($right(%age, 1) == $chr(44),$left(%age, -1),%age) }
  53. ;*****************************************************************************************************************************************************************************************************************************************************************
  54. alias replaceLiNK { return $replace($remove($1, ),�?�©,�©,&aring;,�¥,&#39;,',&quot;,",&amp,&,&#x27;,',&#39;,',&ndash;,â??,&middot;,�·,&raquo;,�»,&laquo;,�«,&Uuml;,�?,&uuml;,�¼,&Aacute;,�,&aacute;,�¡,&Eacute;,�?,&eacute;,�©,&Iacute;,�,&iacute;,�­,&Oacute;,�?,&oacute;,�³,&Ntilde;,�?,&ntilde;,�±,&Uacute;,�?,&uacute;,�º,&nbsp;,$chr(32),&#8221;,â?,&#8220;,â??,#8220;,â??,#8221;,â?,&#230;,�¦,&#229;,�¥,&#197;,�?,&#248;,�¸,&#216;,�?,�¢â?¬â?+a,$+($chr(32),â??,$chr(32)),�¢â?¬â?,$chr(32),�?�¡,�¡,�?�®,�®,�¢â??�¢,â?¢,�?�©,�©,&#xE5;,�¥,&#8230;,â?¦,&mdash;,-,&#039;,',&#8216;,â??,�?â?°,�?,&#34;,",&#8217;,',&#8211;,-,�?�©,�©,&aelig;,�¦,&quot;,",�?�¦,�¦, �?�¸ ,�¸,�?�¥,�¥,�?â? ,�?,�?�?,�?,�?,�?,&#39;,',�¢â?¬â?¢,',188.114.142.12,HiDDEN,&apos;,',#8217;,â??,&micro;,�³,#8211;,-,&oslash;,�¸,&#8212;,a,�¢â?¬�?,â??,�?�¤,�¤,-&#160;,-,&#8242;,',�?�¼,�¼,�?�©,�©,�?�©,�©,�?�¶,�¶,&#252;,�¼,&#198;,�?,�?â?¦,�?,&#233;,�©,\u0027,',�¢â?¬�?,â??,�¢â?¬,â?,&#38;,&,|,|) }
  55. alias -l trnum { var %trnum $base($calc($base(%trnum,36,10) +1),10,36) | return %trnum }
  56. alias -l noHTML { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, ,&nbsp;) | return %x }
  57. alias -l LongTime { return $+(15,$replacex($1,wks,14weeks15,wk,14week15,days,14days15,day,14day15,hrs,14hours15,hr,14hour15,mins,14minutes15,min,14minute15,sec,14second),14) }
  58. alias -l FullDate { return $iif($Mid($1,1,3) == Tom,$replacex($day,Sun,Mon,Mon,Tues,Tues,Wednes,Wednes,Thurs,Thurs,Fri,Fri,Satur,Satur,Sun),$iif($Mid($1,1,3) == Yes,$replace($day,Mon,Sun,Tues,Mon,Wednes,Tues,Thurs,Wednes,Fri,Thurs,Satur,Fri,Sun,Satur),$iif($Mid($1,1,3) == Tod,$day,$iif($Mid($1,1,3) == Mon,Monday,$iif($Mid($1,1,3) == Tue,Tuesday,$iif($Mid($1,1,3) == Wed,Wednesday,$iif($Mid($1,1,3) == Thu,Thursday,$iif($Mid($1,1,3) == Fri,Friday,$iif($Mid($1,1,3) == Sat,Saturday,$iif($Mid($1,1,3) == Sun,Sunday,$null)))))))))) }
  59. alias -l SetMonth { return $replace($1,Jan,1,Feb,2,Mar,3,Apr,4,May,5,Jun,6,Jul,7,Aug,8,Sep,9,Oct,10,Nov,11,Dec,12) }
  60. ;*** Text Overflow Limiting *** Downloaded from: http://www.hawkee.com/snippet/7305/
  61. alias mCuttext { var %ch $1,%str $2-,%max $calc(498 - $len(%ch) - $len($address($me,5)))
  62.   while (%str) { var %cut $limtok(%str,%max,32) | msg %ch %cut | var %str $gettok(%str,$+($calc($numtok(%cut,32) + 1),-),32) }
  63. }
  64. alias mCuttextN { var %ch $1,%str $2-,%max $calc(498 - $len(%ch) - $len($address($me,5)))
  65.   while (%str) { var %cut $limtok(%str,%max,32) | .notice %ch %cut | var %str $gettok(%str,$+($calc($numtok(%cut,32) + 1),-),32) }
  66. }
  67. alias limtok { if ($len($gettok($1,1,$3)) >= $2) { return $left($1,$2) } | var %x 1,%str,%c | while ($gettok($1,%x,$$3)) { var %c $v1 | if ($calc($len(%c) + $len(%str)) <= $2) { var %str $+(%str,$chr($3),%c) } | else { break } | inc %x } | return $mid(%str,2) }
  68. ;*****************************************************************************************************************************************************************************************************************************************************************
  69. alias -l Check.Settings {
  70.   if ($1 = Ep) || ($1 = Sch) {
  71.     if (%TV_Where == $null) || (%TV_Where2 == $null) { $iif($1 = Sch,set -u17 %TV_Where,set -u17 %TV_Where2) 0 }
  72.     if (%TV_Where == 1) || (%TV_Where2 == 1) { set -u17 %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
  73.     elseif (%TV_Where == 0) || (%TV_Where2 == 0) { set -u17 %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
  74.     if (%TVRage_Query. [ $+ [ $2 ] ] == 1) { set -u17 %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
  75.   }
  76. }
  77. alias -l CheckEP {
  78.   var %temp $GetTok($2-,$numtok($2-,32),32)
  79.   $iif(e isin %Temp,%Temp = $replace(%Temp,e,x))
  80.   set %Check_Season. [ $+ [ $1 ] ] $Mid(%Temp,1,$Calc($pos(%Temp,x)-1))
  81.   set %Check_EP. [ $+ [ $1 ] ] $Mid(%Temp,$Calc($pos(%Temp,x)+1))
  82.   if ($mid(%Check_Season. [ $+ [ $1 ] ],1,1) = s) { Set %Check_Season. [ $+ [ $1 ] ] $Mid(%Check_Season. [ $+ [ $1 ] ],2) }
  83.   if ((%Check_season. [ $+ [ $1 ] ] isnum) && (%Check_EP. [ $+ [ $1 ] ] isnum)) { Return 1 }
  84.   else { Return 0 }
  85. }
  86. alias -l msg {
  87.   if (%TV_Color = 0) { var %Temp = $strip($1-) | tokenize 32 %Temp }
  88.   if ($Show) { $iif($1 !ischan,!.msg $1 $iif(%TV_Color == 0,$strip($2-),$2-),!msg $1 $iif(c isincs $chan($1).mode,$strip($2-),$iif(%TV_Color == 0,$strip($2-),$2-))) }
  89.   else { !.msg $1 $iif(c isincs $chan($1).mode,$strip($2-),$iif(%TV_Color == 0,$strip($2-),$2-)) }
  90. }
  91. on *:sockopen:TVRage.*: { var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
  92.   if ($sockerr > 0) return
  93.   ;**************************
  94.   elseif (%TVRage_ONLY. [ $+ [ %num ] ] == SHOW) && (%show_ID. [ $+ [ %num ] ] != $null) { if (!%show_ID. [ $+ [ %num ] ]) { echo -at Sorry... unknown error... this option might not be implemented anymore | halt } | set %show_ID+. [ $+ [ %num ] ] %show_ID. [ $+ [ %num ] ] | sockwrite -n $sockname GET $+(/myfeeds/showinfo.php?key=sqsTSaJG4qJagM6ldpKZ&sid=,%show_ID+. [ $+ [ %num ] ]) HTTP/1.1 }
  95.   ;****************************************************************************************
  96.   elseif ((%TVRage_Type. [ $+ [ %num ] ] == SHOW) || (%TVRage_Type. [ $+ [ %num ] ] = EP) || (%TVRage_Type. [ $+ [ %num ] ] = EPSpec)) { sockwrite -n $sockname GET $+(/tools/quickinfo.php?show=,%tvshow. [ $+ [ %num ] ]) HTTP/1.0 }
  97.   ;************************************
  98.   set %TVRage_Day. [ $+ [ %num ] ] 0
  99.   ;************************************
  100.   sockwrite -n $sockname Host: $iif(%HOST,$v1,services.tvrage.com)
  101.   sockwrite -n $sockname Connection: keep-alive
  102.   sockwrite $sockname $crlf
  103. }
  104. on *:sockread:TVRage.*: { var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
  105.   if ($sockerr) { return }
  106.   var %TVRead | sockread %TVRead
  107.   ;************************************************************************************************************************************
  108.   if (*Accept-Ranges:* iswm %TVRead) || (*X-Src-Webcache:* iswm %TVRead) || (*Connection:* iswm %TVRead) || (*TCN:* iswm %TVRead) || (*Content-Type:* iswm %TVRead) || (*Keep-Alive:* iswm %TVRead) || (*Date:* iswm %TVRead) || (*Server:* iswm %TVRead) || (*X-Powered-By:* iswm %TVRead) || (*Vary:* iswm %TVRead) || (*Content-Length:* iswm %TVRead) || (*Expires:* iswm %TVRead) || (*Cache-Control:* iswm %TVRead) || (*Pragma:* iswm %TVRead) || (*Set-Cookie:* iswm %TVRead) || (*Transfer-Encoding:* iswm %TVRead) || (*HTTP/1.1 200 OK* iswm %TVRead) || (*HTTP/1.1 501 Invalid Request* iswm %TVRead) || (*HTTP/1.1 404* iswm %TVRead) { $iif(*HTTP/1.1 404* iswm %TVRead,$iif(%TVRage_Target. [ $+ [ %num ] ],msg $v1,echo -at) $remove(%TVRead,HTTP/1.1 404),$iif(*HTTP/1.1 501 Invalid Request* iswm %TVRead,$iif(%TVRage_Target. [ $+ [ %num ] ],msg $v1,echo -at) Sorry... bad request... try again)) | $iif(*HTTP/1.1 404* iswm %TVRead,sockclose $sockname,$iif(*HTTP/1.1 501 Invalid Request* iswm %TVRead,sockclose $sockname)) | return }
  109.   ;*** Testing
  110.   ;  $iif(%TVRead != $null,echo -at $+(5,$replace($remove($v1,<pre>),@,15@14)))
  111.   ;***********************************************************************************
  112.   ;*** Show summary
  113.   if (%show_ID+. [ $+ [ %num ] ]) {
  114.     if (<image> isin %TVRead) { set %show_PiC [ $+ [ %num ] ] $nohtml(%TVRead) }
  115.     elseif (<summary> isin %TVRead) { %X = $replaceLiNK($remove(%TVRead,<summary>,  )) | $iif(*</summary>* iswm %TVRead,set %X $mid(%X,1,$calc($pos(%X,</summary>) -1))) | write tvrage.txt %X | unset %X }
  116.     elseif ($regex(%TVRead,<[^<>]+>) == 0) { $iif(%TVRead != $null,write tvrage.txt $replaceLiNK($v1)) }
  117.     if (</summary> isin %TVRead) { sockclose $sockname | $iif(%TVRage_Target. [ $+ [ %num ] ],msg $v1,echo -at) [ $+(05,%show_name. [ $+ [ %num ] ]) ] $iif(%show_Ended. [ $+ [ %num ] ] != $null,$+(,%show_Status. [ $+ [ %num ] ],) 14-4#14- $LongTime+($calc($cTime -$cTime($SetMonth(%show_Ended. [ $+ [ %num ] ])))) ago $+($chr(40),15,$replace(%show_Ended. [ $+ [ %num ] ],/,14/15),,$chr(41)),$iif(%show_Airtime. [ $+ [ %num ] ],$+(4,$v1,))) $iif(%show_Class. [ $+ [ %num ] ],$+(,$chr(40),15,$v1,,$chr(41),)) $iif(%show_Genre. [ $+ [ %num ] ],$+(14,$replace($v1,|,15/14),)) $iif(!%show_Ended. [ $+ [ %num ] ],since,from) $+(7,%show_Started. [ $+ [ %num ] ],$iif($len(%show_Ended. [ $+ [ %num ] ]) == 11 && %show_Started. [ $+ [ %num ] ] !isin %show_Ended. [ $+ [ %num ] ],$+(14-07,$gettok($v2,3,47))),) $iif(!%show_Ended. [ $+ [ %num ] ],$+(,$chr(40),%show_Status. [ $+ [ %num ] ],,$chr(41),)) $iif(%show_Network. [ $+ [ %num ] ] != $null,$iif(!%show_Ended. [ $+ [ %num ] ],airs,aired) on $+(7,$iif(%show_Country. [ $+ [ %num ] ] !isin %show_Network. [ $+ [ %num ] ],$v2 $+(15,$chr(40),07,$v1,15,$chr(41)),$replace($v2,$chr(40),$+(15,$chr(40),07),$chr(41),$+(15,$chr(41)))),)) $iif(%Show_link. [ $+ [ %num ] ],$+(15,$chr(40),2,$v1,15,$chr(41),))) $iif(%show_PiC [ $+ [ %num ] ],5Show images: $+(2,$v1,))
  118.     if ($lines(tvrage.txt) >= 1) { var %x 1 | while (%x <= $lines(tvrage.txt)) { $iif(%TVRage_Target. [ $+ [ %num ] ],$iif($lines(tvrage.txt) <= 1,mCuttext %TVRage_Target. [ $+ [ %num ] ],mCuttextN %TVRage_Nick. [ $+ [ %num ] ]),echo -at) $iif(%x == 1,5Description:) $read(tvrage.txt,%x) | inc %x } | .remove tvrage.txt } | goto ENDiTNOW }
  119.     return
  120.   }
  121.   if (!$sockbr) return
  122.   ;************************************************************************************************************************************
  123.   ;*** !TV / !EP / !SHOW / !NEXT / !N / !LAST / !L
  124.   elseif ($regex($strip(%TVRead),/Show ID@(.*)/)) { set %show_ID. [ $+ [ %num ] ] $regml(1) }
  125.   elseif ($regex($strip(%TVRead),/Show Name@(.*)/)) { set %show_Name. [ $+ [ %num ] ] $regml(1) }
  126.   elseif ($regex($strip(%TVRead),/Show URL@(.*)/)) { set %show_Link. [ $+ [ %num ] ] $remove($regml(1),http://) }
  127.   elseif ($regex($strip(%TVRead),/Premiered@(.*)/)) { set %show_Started. [ $+ [ %num ] ] $regml(1) }
  128.   elseif ($regex($strip(%TVRead),/Started@(.*)/)) { set %show_Started+. [ $+ [ %num ] ] $regml(1) }
  129.   elseif ($regex($strip(%TVRead),/Ended@(.*)/)) { set %show_Ended. [ $+ [ %num ] ] $regml(1) }
  130.   ;  elseif ($regex($strip(%TVRead),/Episode Info@(.*)/)) { set %show_EP. [ $+ [ %num ] ] $regml(1) }
  131.   elseif ($regex($strip(%TVRead),/Episode URL@(.*)/)) { set %show_URL. [ $+ [ %num ] ] $remove($regml(1),http://) }
  132.   ;  elseif ($regex($strip(%TVRead),/Latest Episode@(.*)/)) { set %show_Last. [ $+ [ %num ] ] $regml(1) }
  133.   ;  elseif ($regex($strip(%TVRead),/Next Episode@(.*)/)) { set %show_Next. [ $+ [ %num ] ] $regml(1) }
  134.   elseif ($regex($strip(%TVRead),/RFC3339@(.*)/)) { set %show_RFC. [ $+ [ %num ] ] $regml(1) }
  135.   elseif ($regex($strip(%TVRead),/GMT+0 NODST@(.*)/)) { set %show_GMT. [ $+ [ %num ] ] $regml(1) }
  136.   ;* ^ set %tvr.airnextepcmt $calc($gettok($regml(1),2,64) - $ctime + 3600) | echo -at %tvr.airnextepcmt vs $calc($gettok(%show_GMT. [ $+ [ %num ] ],2,64) - $ctime + 3600)
  137.   elseif ($regex($strip(%TVRead),/Country@(.*)/)) { set %show_Country. [ $+ [ %num ] ] $regml(1) }
  138.   elseif ($regex($strip(%TVRead),/Status@(.*)/)) { set %show_Status. [ $+ [ %num ] ] $replace($regml(1),Return,9Return,Final,3Final,Canceled/Ended,4Canceled,New,8New) }
  139.   elseif ($regex($strip(%TVRead),/Classification@(.*)/)) { set %show_Class. [ $+ [ %num ] ] $regml(1) }
  140.   elseif ($regex($strip(%TVRead),/Genres@(.*)/)) { set %show_Genre. [ $+ [ %num ] ] $regml(1) }
  141.   elseif ($regex($strip(%TVRead),/Network@(.*)/)) { set %show_Network. [ $+ [ %num ] ] $regml(1) }
  142.   ;  elseif ($regex($strip(%TVRead),/Airtime@(.*)/)) { set %show_Airtime. [ $+ [ %num ] ] $replace($regml(1),day,days,pm,PM,am,AM) }
  143.   ;  elseif ($regex($strip(%TVRead),/Runtime@(.*)/)) { set %show_Runtime. [ $+ [ %num ] ] $regml(1) }
  144.   ;************************************************************************************************************************************
  145.   ;*** Episode iNFO
  146.   elseif ($regex($strip(%TVRead),/Episode Info@(.*)/)) { set %show_EP. [ $+ [ %num ] ] $regml(1) | set -u3 %TVRead+ $gettok(%TVRead,2,64) | set -u3 %TVRead_DATE $gettok(%TVRead+,3,94) | set %TVRead_EP $gettok(%TVRead+,1,94) | set %TVRead_TiTLE $gettok(%TVRead+,2,94) | set %show_Spec. [ $+ [ %num ] ] $+(14,$replace(%TVRead_EP,x,15x14)) $iif(%TVRead_TiTLE,14-4#14- $+(15,$v1)) | set %show_Spec_Title. [ $+ [ %num ] ] %TVRead_TiTLE | set %show_Spec_EP. [ $+ [ %num ] ] %TVRead_EP | set %show_Spec_Airdate. [ $+ [ %num ] ] %TVRead_DATE | set %show_Spec_Airdate+. [ $+ [ %num ] ] $replace(%show_Spec_Airdate. [ $+ [ %num ] ],Jan,01,Feb,02,Mar,03,Apr,04,May,05,Jun,06,Jul,07,Aug,08,Sep,09,Oct,10,Nov,11,Dec,12) }
  147.   ;**********************************************************************************************************************************
  148.   ;*** Last + Next
  149.   elseif ($regex($strip(%TVRead),/Latest Episode@(.*)/)) || ($regex($strip(%TVRead),/Next Episode@(.*)/)) { set -u3 %TVRead+ $gettok(%TVRead,2,64) | set -u3 %TVRead_DATE $gettok(%TVRead+,3,94) | set -u3 %TVRead_EP $gettok(%TVRead+,1,94) | set -u3 %TVRead_TiTLE $gettok(%TVRead+,2,94) | $iif(Latest Episode@ isin %TVRead,set %show_Last. [ $+ [ %num ] ],set %show_Next. [ $+ [ %num ] ]) $+(14,$replace(%TVRead_EP,x,15x14)) $iif(%TVRead_TiTLE,14-4#14- $+(15,$v1)) | $iif(Latest Episode@ isin %TVRead,set %show_Last_Title. [ $+ [ %num ] ],set %show_Next_Title. [ $+ [ %num ] ]) %TVRead_TiTLE | $iif(Latest Episode@ isin %TVRead,set %show_Last_EP. [ $+ [ %num ] ],set %show_Next_EP. [ $+ [ %num ] ]) %TVRead_EP | $iif(Latest Episode@ isin %TVRead,set %show_Last_Airdate. [ $+ [ %num ] ],set %show_Next_Airdate. [ $+ [ %num ] ]) $+($GetTok(%TVRead_DATE,2,47),/,$GetTok(%TVRead_DATE,1,47),/,$GetTok(%TVRead_DATE,3,47)) | $iif(Latest Episode@ isin %TVRead,set %show_Last_Airdate+. [ $+ [ %num ] ],set %show_Next_Airdate+. [ $+ [ %num ] ]) $replace($iif(Latest Episode@ isin %TVRead,%show_Last_Airdate. [ $+ [ %num ] ],%show_Next_Airdate. [ $+ [ %num ] ]),Jan,01,Feb,02,Mar,03,Apr,04,May,05,Jun,06,Jul,07,Aug,08,Sep,09,Oct,10,Nov,11,Dec,12)) | $iif(%show_Ended. [ $+ [ %num ] ] != $null,$iif(Latest Episode@ isin %TVRead && $len(%show_Ended. [ $+ [ %num ] ]) >= 11,set %show_Ended. [ $+ [ %num ] ] $+($gettok(%show_Ended. [ $+ [ %num ] ],2,47),/,$gettok(%show_Ended. [ $+ [ %num ] ],1,47),/,$gettok(%show_Ended. [ $+ [ %num ] ],3,47)),set %show_Ended. [ $+ [ %num ] ] %show_Last_Airdate. [ $+ [ %num ] ]),unset %show_Ended. [ $+ [ %num ] ]) }
  150.   ;**********************************************************************************************************************************
  151.   ;*** Airtime (cTime)
  152.   elseif ($regex($strip(%TVRead),/Airtime@(.*)/)) { set %show_Airtime. [ $+ [ %num ] ] $replace($regml(1),day,days,pm,PM,am,AM) | $iif(%show_Spec_Airdate+. [ $+ [ %num ] ],set %show_Spec_cTime. [ $+ [ %num ] ] $cTime($v1 $GetTok(%Show_Airtime. [ $+ [ %num ] ],3-4,32))) | $iif(%show_Last_Airdate+. [ $+ [ %num ] ],set %show_Last_cTime. [ $+ [ %num ] ] $cTime($v1 $GetTok(%Show_Airtime. [ $+ [ %num ] ],3-4,32))) | $iif(%show_Next_Airdate+. [ $+ [ %num ] ],set %show_Next_cTime. [ $+ [ %num ] ] $cTime($v1 $GetTok(%Show_Airtime. [ $+ [ %num ] ],3-4,32))) }
  153.   ;**********************************************************************************************************************************
  154.   ;*** Runtime ( sockclose )
  155.   elseif ($regex($strip(%TVRead),/Runtime@(.*)/)) { set %show_Runtime. [ $+ [ %num ] ] $regml(1) | sockclose $sockname | Check.Settings Ep %Num
  156.     ;*** !SHOW
  157.     if (%TVRage_ONLY. [ $+ [ %num ] ] == SHOW) && (%show_ID. [ $+ [ %num ] ]) { $iif(%show_ID. [ $+ [ %num ] ] != $null,TVRage %num $v1) | halt }
  158.     ;**********************************************************************************************************************************
  159.     ;*** ERROR - $iif(%show_Last_Airdate+. [ $+ [ %num ] ],$+($chr(40),15,$replace($v1,/,14/15),,$chr(41))))
  160.     elseif (!%show_Next. [ $+ [ %num ] ]) && (%TVRage_ONLY. [ $+ [ %num ] ] == NEXT) { goto TVRage_iNFO }
  161.     elseif (!%show_Next. [ $+ [ %num ] ]) && (%TVRage_ONLY. [ $+ [ %num ] ] == NEXT) { msg %TVRage_Target. [ $+ [ %num ] ] No information available for $+(5,%show_name. [ $+ [ %num ] ],) $+(15,$chr(40),14,$left(%show_Last_EP. [ $+ [ %num ] ],2),15x14,$calc($mid(%show_Last_EP. [ $+ [ %num ] ],4,2) +1),15,$chr(41),) 14-4#14- 5Reason: $iif(!%show_Ended. [ $+ [ %num ] ],Unknown... might not be schedule yet $+(15,$chr(40),%show_Status. [ $+ [ %num ] ],15,$chr(41),),$iif(%show_Last_cTime. [ $+ [ %num ] ],The show sadly ended $+(15,$replacex($duration($calc($cTime -$v1)),wks,14weeks15,wk,14week15,days,14days15,day,14day15,hrs,14hours15,hr,14hour15,mins,14minutes15,min,14minute,secs,14seconds,sec,14second) 14ago),Sadly this show has either ended or been canceled)) $iif(%Show_link. [ $+ [ %num ] ],$+(15,$chr(40),2,$v1,15,$chr(41),)) | goto ENDiTNOW }
  162.     elseif (%TVRage_Type. [ $+ [ %num ] ] == EPSpec) && ((%Check_Season. [ $+ [ %num ] ]) || (%Check_EP. [ $+ [ %num ] ])) && (!%show_Spec_EP. [ $+ [ %num ] ]) { msg %TVRage_Target. [ $+ [ %num ] ] No information available for $+(5,%show_name. [ $+ [ %num ] ],) $+(15,$chr(40),14,$iif($len(%Check_Season. [ $+ [ %num ] ]) == 1,0),%Check_Season. [ $+ [ %num ] ],15x14,$iif($len(%Check_EP. [ $+ [ %num ] ]) == 1,0),%Check_EP. [ $+ [ %num ] ],15,$chr(41),) 14-4#14- 5Reason: Not that many episodes in the $+(14,$ord(%Check_Season. [ $+ [ %num ] ]),) season $iif(%Show_link. [ $+ [ %num ] ],$+(15,$chr(40),2,$v1,/episode_list/,%Check_Season. [ $+ [ %num ] ],15,$chr(41),)) | goto ENDiTNOW }
  163.     ;**********************************************************************************************************************************
  164.     ;*** EPSpecs
  165.     elseif (%show_Spec_EP. [ $+ [ %num ] ] != $null) { msg %TVRage_Target. [ $+ [ %num ] ] $+(05,%show_name. [ $+ [ %num ] ],) 14-4#14- %show_Spec. [ $+ [ %num ] ] $iif(%show_Spec_cTime. [ $+ [ %num ] ] > $cTime,5Airing in:,5Aired:) $iif(%show_Spec_cTime. [ $+ [ %num ] ] != $null,$LongTime+($calc($cTime -$cTime(%show_Spec_Airdate+. [ $+ [ %num ] ])))) $iif(%show_Spec_cTime. [ $+ [ %num ] ] < $cTime,ago) $+($chr(40),15,$replace(%show_Spec_Airdate+. [ $+ [ %num ] ],/,14/15),,$chr(41)) $iif(%show_URL. [ $+ [ %num ] ] != $null,$+(15,$chr(40),2,$v1,15,$chr(41),))) | $iif(%show_URL. [ $+ [ %num ] ] != $null,TVPlot %TVRage_Target. [ $+ [ %num ] ] %show_URL. [ $+ [ %num ] ]) | goto ENDiTNOW }
  166.     ;*** SHOW iNFO / MSG
  167.     elseif (!%TVRage_ONLY. [ $+ [ %num ] ]) { :TVRage_iNFO | $iif(%TVRage_Target. [ $+ [ %num ] ],msg $v1,echo -at) [ $+(05,%show_name. [ $+ [ %num ] ]) ] $iif(%show_Ended. [ $+ [ %num ] ] != $null,Ended and/or canceled 14-4#14- $LongTime+($calc($cTime -$cTime($SetMonth(%show_Ended. [ $+ [ %num ] ])))) ago $+($chr(40),15,$replace(%show_Ended. [ $+ [ %num ] ],/,14/15),,$chr(41)),$iif(%show_Airtime. [ $+ [ %num ] ],$+(4,$v1,))) $iif(%show_Class. [ $+ [ %num ] ],$+(,$chr(40),15,$v1,,$chr(41),)) $iif(%show_Genre. [ $+ [ %num ] ],$+(14,$replace($v1,|,15/14),)) $iif(!%show_Ended. [ $+ [ %num ] ],since,from) $+(7,%show_Started. [ $+ [ %num ] ],$iif($len(%show_Ended. [ $+ [ %num ] ]) == 11 && %show_Started. [ $+ [ %num ] ] !isin %show_Ended. [ $+ [ %num ] ],$+(14-07,$gettok($v2,3,47))),) $iif(!%show_Ended. [ $+ [ %num ] ],$+(,$chr(40),%show_Status. [ $+ [ %num ] ],,$chr(41),)) $iif(%show_Network. [ $+ [ %num ] ] != $null,$iif(!%show_Ended. [ $+ [ %num ] ],airs,aired) on $+(7,$iif(%show_Country. [ $+ [ %num ] ] !isin %show_Network. [ $+ [ %num ] ],$v2 $+(15,$chr(40),07,$v1,15,$chr(41)),$replace($v2,$chr(40),$+(15,$chr(40),07),$chr(41),$+(15,$chr(41)))),)) $iif(%Show_link. [ $+ [ %num ] ],$+(15,$chr(40),2,$v1,15,$chr(41),))) | $iif(!%show_Next. [ $+ [ %num ] ] && %TVRage_ONLY. [ $+ [ %num ] ] == NEXT,goto TVRage_LAST) }
  168.     ;*** !LAST
  169.     if ((!%TVRage_ONLY. [ $+ [ %num ] ]) || (%TVRage_ONLY. [ $+ [ %num ] ] == LAST)) && (%show_Last. [ $+ [ %num ] ] != $null) { :TVRage_LAST | msg %TVRage_Target. [ $+ [ %num ] ] $iif(%TVRage_ONLY. [ $+ [ %num ] ] == LAST,$+(5,%show_name. [ $+ [ %num ] ],) 14-4#14-,5Last Episode) %show_Last. [ $+ [ %num ] ] $iif(%show_Last_cTime. [ $+ [ %num ] ],5Aired: $+(15,$LongTime+($calc($cTime -$v1)) 14ago)) $iif(%show_Last_Airdate+. [ $+ [ %num ] ],$+($chr(40),15,$replace($v1,/,14/15),,$chr(41))) $iif(%TVRage_ONLY. [ $+ [ %num ] ] == LAST && %Show_link. [ $+ [ %num ] ] != $null,$+(15,$chr(40),2,%Show_link. [ $+ [ %num ] ],15,$chr(41),))) }
  170.     ;*** !NEXT
  171.     if (%show_Next. [ $+ [ %num ] ] != $null) && ((!%TVRage_ONLY. [ $+ [ %num ] ]) || (%TVRage_ONLY. [ $+ [ %num ] ] == NEXT)) { msg %TVRage_Target. [ $+ [ %num ] ] $iif(%TVRage_ONLY. [ $+ [ %num ] ] == NEXT,$+(5,%show_name. [ $+ [ %num ] ]) 14-4#14-,5Next Episode) $+(%show_Next. [ $+ [ %num ] ],) $iif(%show_Next_cTime. [ $+ [ %num ] ] > $cTime,5Airing in: $+($LongTime+($calc($v1 -$cTime)),),5Aired: $+($LongTime+($calc($cTime -$v1)),)) $iif(%show_Next_Airdate+. [ $+ [ %num ] ],$+($chr(40),15,$replace($v1,/,14/15),,$chr(41))) $iif(%TVRage_ONLY. [ $+ [ %num ] ] == NEXT && %Show_link. [ $+ [ %num ] ] != $null,$+(15,$chr(40),2,%Show_link. [ $+ [ %num ] ],15,$chr(41),)))) }
  172.     :ENDiTNOW
  173.     unset %TVRead* %tvshow* [ $+ [ %num ] ] %show_* [ $+ [ %num ] ] %TVRage_* [ $+ [ %num ] ] %Check_* [ $+ [ %num ] ] %next_* [ $+ [ %num ] ] %show_* [ $+ [ %num ] ]
  174.   }
  175. }
  176. on *:sockclose:TVRage.*:{ var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1)) | .unset %tvshow* [ $+ [ %num ] ] %show_* [ $+ [ %num ] ] %TVRage_* [ $+ [ %num ] ] %Check_* [ $+ [ %num ] ] %next_* [ $+ [ %num ] ] }
  177. ;**********************************************************************************************************************************
  178. ;*** TVPlot
  179. alias TVPlot { set -u5 %CHAN $1 | $iif($2,set %TVPlot-Link $remove($2,www.tvrage.com,http://)) | sockClose TVPlot | sockOpen TVPlot www.tvrage.com 80 }
  180. on *:SockOpen:TVPlot: { sockwrite -nt TVPlot GET $iif(%TVPlot-Link,$v1,/House/episodes/1064858782) HTTP/1.1 | sockwrite -nt TVPlot Host: www.tvrage.com | sockwrite -nt TVPlot $crlf | unset %TVPlot-Link }
  181. on *:SockRead:TVPlot: { tokenize 32 $sock($sockname).mark | var %read | sockRead %read | if (<span class="addthis_toolbox addthis_default_style "> isin %read) { set -u1 %Plot $noHTML($v2) | $iif(Source: isin %Plot,set -u1 %Plot $mid($noHTML(%read),1,$pos($noHTML(%read),.Source:))) | $iif(%Plot != $null,$iif(%CHAN,mCuttext $v1,echo -at) 5Summary: $iif(Click Here To Add isin %Plot,Not availible for this episode,%Plot)) } }
  182. ;**********************************************************************************************************************************
  183. ;*** Dialog section
  184. dialog -l TVSettings {
  185.   title "TVRage Settings"
  186.   size -1 -1 264 217
  187.   option pixels
  188.   box "", 1, 8 8 249 60
  189.   box "", 2, 8 67 249 60
  190.   box "", 3, 8 126 249 43
  191.   box "", 12, 8 168 249 43
  192.   text "Select where you want the Schedule Displayed", 4, 16 21 225 17
  193.   radio "Channel", 5, 32 45 65 13, group
  194.   radio "Private Message", 6, 128 45 105 13,
  195.   text "Select where you want the Replys Displayed", 7, 16 80 225 17
  196.   radio "Channel", 8, 32 104 65 13, group
  197.   radio "Private Message", 9, 128 104 105 13,
  198.   check "Enable TVRage", 10, 32 188 113 13
  199.   button "&Save Settings", 11, 144 182 89 25, ok
  200.   check "Enable Colors", 13, 32 145 113 13
  201. }
  202. on *:dialog:TVSettings:*:*:{
  203.   if ($Devent == init) {
  204.     if (%TV_Where = 1) { did -c $dname 8 }
  205.     else { did -c $dname 9 }
  206.     if (%TV_Where2 = 1) { did -c $dname 5 }
  207.     else { did -c $dname 6 }
  208.     if (%TV_Rage = 1) { did -c $dname 10 }
  209.     else { did -u $dname 10 }
  210.     if (%TV_Color = 1) { did -c $dname 13 }
  211.     else { did -u $dname 13 }
  212.   }
  213.   elseif ($devent == Close) {
  214.     set %TV_Where $iif($Did($Dname,8).state = 1,1,0)
  215.     set %TV_Where2 $iif($Did($Dname,5).state = 1,1,0)      
  216.     set %TV_Rage $iif($Did($Dname,10).state = 1,1,0)
  217.     set %TV_Color $iif($Did($Dname,13).state = 1,1,0)
  218.     echo -at 14TVRage Settings have been saved.
  219.   }
  220. }
  221. dialog -l SelfSearch {
  222.   title "TVRage Search"
  223.   size -1 -1 500 202
  224.   option pixels
  225.   box "", 1, 8 8 486 145
  226.   box "", 2, 8 152 486 43
  227.   text "Search Options:", 3, 16 16 462 17
  228.   text "<Show> (Season and Episode) EX: House 2x05", 4, 30 33 462 17
  229.   text "Schedule <Day of Week> EX: Schedule Fri", 5, 30 50 462 17
  230.   text "Schedule <Day of Week> (Time)  EX: Schedule Wed 10", 6, 30 67 462 17
  231.   text "Schedule <Day of Week> (Time) (Country:US,GB,UK,AU) EX: Schedule Saturday 10 GB", 7, 30 84 462 17
  232.   text "Option in ( ) are Optional. Options in < > are Required.", 8, 30 101 462 17
  233.   edit "", 9, 16 125 462 17, autohs
  234.   button "Search", 10, 335 165 65 25
  235.   button "Cancel", 11, 414 165 65 25, cancel
  236. }
  237. on *:dialog:SelfSearch:sclick:*:{
  238.   if ($Did = 10) && ($Did(9) = $null) && ($dialog(error,error,-4)) { did -f $Dname 9 }
  239.   elseif ($Did = 10)  { var %Num = $trnum | set %TVRage_Target. [ $+ [ %num ] ] $me | set %TVRage_Nick. [ $+ [ %num ] ] $me | set %TVRage_Chan. [ $+ [ %num ] ] $me | TVRage.Load %num !ep $did(9).text | echo -at Check you Private Message for the infomation that you requested | dialog -x $dname }
  240. }
  241. dialog -l error {
  242.   title "Error"
  243.   size -1 -1 228 90
  244.   option pixels
  245.   box "", 2, 8 8 214 33
  246.   box "", 3, 8 40 214 43
  247.   button "&Ok", 4, 160 52 50 25, ok
  248.   text "DOH! - You must type something to search for!", 5, 20 20 190 17
  249. }
  250. ;*** END TVRage section ****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement