[size=14]TVRage[/size]
[size=14]Screenshots[/size]
!TV "SHOW"
!TV "SHOW" "SxE"
!Last & !Next "SHOW"
!TV "SHOW" (Preview)
!SHOW "SHOW"
!TODAY
Schedule
[size=14]NOTE:[/size]
As you might be able to see I've used TVRage Addon (<www.mirc.net/projects.php?go=1204694830>) by @Gecko321
And would like the time to say; thanks for sharing... I really appreciate it... and I know I'm the only one who have enjoyed your script <3
Would also like to thanks @hxck - I've "ripped" a bit from your script (http://www.hawkee.com/snippet/8822)
Also using BetterDuration and Text Overflow Limiting in this script... both added but neither originally made by Me...
Again... thanks for sharing <3 I really appreciate it
[size=14]Install[/size]
[size=14]Setup[/size]
[size=14]Update(s):[/size]
Added input event so it will work on the host (/BOT) running the script.
Fixed a "small" error that made the script search on !NEXT / !LAST every time you did a !/@/. CMD that started with N / L
Added a "fix" for when site is down... will now show you site is down instead of just doing noting.
Fixed trigger "error" to show the trigger used instead of ! no mater what.
;****
If you are... A fellow stoner... Danish... Cultivator... Crazy about weed...
Got any pictures of your own strain / lovely females...
Got free weed... Want to chill... Wanna hang out...
Found bugs... Need help with one of My script...
The most advanced TVRage script out there for mIRC...
;*** TVRage - "Original" code by Gecko321 (www.mirc.net/projects.php?go=1204694830) *** SRU EDiT - Downloaded from: http://www.hawkee.com/snippet/9506/
on *:LOAD:dialog -m TVSettings TVSettings -4
on *:UNLOAD:.unset %TV_*
menu Channel,Status,Menubar,Query {
-
$iif(%TV_Rage = 1,$style(1)) TVRage $+($chr(40),$iif(%TV_Rage = 1,Enabled,Disabled),$chr(41))
.Settings:dialog -m TVSettings TVSettings -4
.Self Search:dialog -m SelfSearch SelfSearch -4
.-
.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)
-
}
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,5) == TODAY && $len($strip($1)) == 6) || ($mid($strip($1),2,8) == TOMORROW && $len($strip($1)) == 9) || ($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-) } }
on @*:INPUT:#: {
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,5) == TODAY && $len($strip($1)) == 6) || ($mid($strip($1),2,8) == TOMORROW && $len($strip($1)) == 9) || ($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
if ($2 = Schedule) { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where2 = 1,$me,$Target) }
elseif ($Target !ischan) { set %TVRage_Target. [ $+ [ %num ] ] $me | set %TVRage_Query. [ $+ [ %num ] ] 1 }
else { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where = 1,$Target,$me) }
set %TVRage_Chan. [ $+ [ %num ] ] $chan | set %TVRage_Nick. [ $+ [ %num ] ] $me
TVRage.Load %num $1-
}
}
alias mTVRage {
;*** Not turned on
if (%TV_Rage == 0) { halt }
;************************************************************
var %num = $trnum | set -u17 %TVRage_TargetC. [ $+ [ %num ] ] # | set %TVRage_Nick. [ $+ [ %num ] ] $nick | set %TVRage_Chan. [ $+ [ %num ] ] $chan
;************************************************************************************************************************************
if ($Target !ischan) || ($2 == Schedule) || ($mid($strip($1),2,5) == TODAY) || ($mid($strip($1),2,8) == TOMORROW) || (Trigger isin $1-2) { set %TVRage_Target. [ $+ [ %num ] ] $nick | set %TVRage_Query. [ $+ [ %num ] ] 1 }
else { set -u17 %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where = 1,$chan,$nick) }
;************************************************************************************************************************************
;*** !TV TRiGGER / CMDS / HELP / COMMANDs
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- $+(3,$iif($1 == !EP,$v2,!TV)) Schedule 4<3Day of Week4> (3Time4) (3Country4) 5EX: $iif($1 == !EP,$v2,!TV) Schedule Fri 10 $iif(%X == 1,GB,$iif(%X == 1,UK,AU)) 5Country: 3GB14, 3UK 14and 3AU (4US by default) 15ooO( Get program schedule for the requested day (Time and/or Country) 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 }
;************************************************************************************************************************************
;*** !N / !NEXT
elseif ($1 == !N) || ($1 == !NEXT) { set -u17 %TVRage_ONLY. [ $+ [ %num ] ] NEXT }
;*** !L / !LAST
elseif ($1 == !L) || ($1 == !LAST) { set -u17 %TVRage_ONLY. [ $+ [ %num ] ] LAST }
;*** !SHOW / !SUMMARY
elseif ($1 == !SHOW) { set -u17 %TVRage_ONLY. [ $+ [ %num ] ] SHOW }
;*** !TODAY / !TOMORROW
elseif ($1 == !TODAY) || ($1 == !TOMORROW) { set %TVRage_Schedule. [ $+ [ %num ] ] !TV Schedule $remove($1-,!) }
;************************************************************************************************************************************
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))
}
alias -l TVRage.Load { var %num = $1
if ($3 == Schedule) { set %TVRage_Type. [ $+ [ %num ] ] $v1
var %temp $GetTok($2-,$numtok($2-,32),32)
if ((%Temp = GB) || (%Temp = UK) || (%Temp = US) || (%Temp = AU)) { set %TVRage_Country. [ $+ [ %num ] ] $v1 | set %TVRage_Type. [ $+ [ %num ] ] Country }
set %TVRage_Time_Schedule. [ $+ [ %num ] ] $iif($5 !isnum,$null,$Int($5)) | set %TVRage_Date. [ $+ [ %num ] ] $FullDate($4)
if (%TVRage_Date. [ $+ [ %num ] ] = $null) { msg %TVRage_Target. [ $+ [ %num ] ] You need to pick a 4Day of the Week $iif(!%TVRage_Country. [ $+ [ %num ] ],or 4Country) | unset %TVRage_*. [ $+ [ %num ] ] %Check_*. [ $+ [ %num ] ] }
TVRage %Num Schedule
}
else { $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- }
}
alias -l TVRage {
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 }
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 ] ]) }
else { %TVShow. [ $+ [ $1 ] ] = $replace($2-,$chr(32),% $+ 20) }
sockopen TVRage. [ $+ [ $1 ] ] services.tvrage.com 80
}
;*** BetterDuration (renamed LongTime+ here) *** Downloaded from: http://www.nealirc.org/IRC/mIRC.html
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) }
;*****************************************************************************************************************************************************************************************************************************************************************
alias replaceLiNK { return $replace($remove($1, ),Ã??Ã?©,Ã?©,å,Ã?Â¥,',',",",&,&,',',',',–,â??,·,Ã?·,»,Ã?»,«,Ã?«,Ü,Ã??,ü,Ã?¼,Á,Ã?Â,á,Ã?¡,É,Ã??,é,Ã?©,Í,Ã?Â,í,Ã?Â,Ó,Ã??,ó,Ã?³,Ñ,Ã??,ñ,Ã?±,Ú,Ã??,ú,Ã?º, ,$chr(32),”,â?Â,“,â??,#8220;,â??,#8221;,â?Â,æ,Ã?¦,å,Ã?Â¥,Å,Ã??,ø,Ã?¸,Ø,Ã??,Ã?¢â?‰?Â+a,$+($chr(32),â??,$chr(32)),Ã?¢â?‰?Â,$chr(32),Ã??Ã?¡,Ã?¡,Ã??Ã?®,Ã?®,Ã?¢â??Ã?¢,â?¢,Ã??Ã?©,Ã?©,å,Ã?Â¥,…,â?¦,—,-,',',‘,â??,Ã??â?°,Ã??,",",’,',–,-,Ã??Ã?©,Ã?©,æ,Ã?¦,",",Ã??Ã?¦,Ã?¦, Ã??Ã?¸ ,Ã?¸,Ã??Ã?Â¥,Ã?Â¥,Ã??â? ,Ã??,Ã??Ã??,Ã??,Ã??,Ã??,',',Ã?¢â?‰?¢,',188.114.142.12,HiDDEN,',',#8217;,â??,µ,Ã?³,#8211;,-,ø,Ã?¸,—,a,Ã?¢â?¬Ã??,â??,Ã??Ã?¤,Ã?¤,- ,-,′,',Ã??Ã?¼,Ã?¼,Ã??Ã?©,Ã?©,Ã??Ã?©,Ã?©,Ã??Ã?¶,Ã?¶,ü,Ã?¼,Æ,Ã??,Ã??â?¦,Ã??,é,Ã?©,\u0027,',Ã?¢â?¬Ã??,â??,Ã?¢â?¬,â?Â,&,&,|,|) }
alias -l trnum { var %trnum $base($calc($base(%trnum,36,10) +1),10,36) | return %trnum }
alias -l noHTML { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, , ) | return %x }
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) }
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)))))))))) }
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) }
;*** Text Overflow Limiting *** Downloaded from: http://www.hawkee.com/snippet/7305/
alias mCuttext { var %ch $1,%str $2-,%max $calc(498 - $len(%ch) - $len($address($me,5)))
while (%str) { var %cut $limtok(%str,%max,32) | msg %ch %cut | var %str $gettok(%str,$+($calc($numtok(%cut,32) + 1),-),32) }
}
alias mCuttextN { var %ch $1,%str $2-,%max $calc(498 - $len(%ch) - $len($address($me,5)))
while (%str) { var %cut $limtok(%str,%max,32) | .notice %ch %cut | var %str $gettok(%str,$+($calc($numtok(%cut,32) + 1),-),32) }
}
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) }
;*****************************************************************************************************************************************************************************************************************************************************************
alias -l Check.Settings {
if ($1 = Ep) || ($1 = Sch) {
if (%TV_Where == $null) || (%TV_Where2 == $null) { $iif($1 = Sch,set -u17 %TV_Where,set -u17 %TV_Where2) 0 }
if (%TV_Where == 1) || (%TV_Where2 == 1) { set -u17 %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
elseif (%TV_Where == 0) || (%TV_Where2 == 0) { set -u17 %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
if (%TVRage_Query. [ $+ [ $2 ] ] == 1) { set -u17 %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
}
}
alias -l CheckEP {
var %temp $GetTok($2-,$numtok($2-,32),32)
$iif(e isin %Temp,%Temp = $replace(%Temp,e,x))
set %Check_Season. [ $+ [ $1 ] ] $Mid(%Temp,1,$Calc($pos(%Temp,x)-1))
set %Check_EP. [ $+ [ $1 ] ] $Mid(%Temp,$Calc($pos(%Temp,x)+1))
if ($mid(%Check_Season. [ $+ [ $1 ] ],1,1) = s) { Set %Check_Season. [ $+ [ $1 ] ] $Mid(%Check_Season. [ $+ [ $1 ] ],2) }
if ((%Check_season. [ $+ [ $1 ] ] isnum) && (%Check_EP. [ $+ [ $1 ] ] isnum)) { Return 1 }
else { Return 0 }
}
alias -l msg {
if (%TV_Color = 0) { var %Temp = $strip($1-) | tokenize 32 %Temp }
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-))) }
else { !.msg $1 $iif(c isincs $chan($1).mode,$strip($2-),$iif(%TV_Color == 0,$strip($2-),$2-)) }
}
on *:sockopen:TVRage.*: { var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
if ($sockerr > 0) return
;**************************
elseif (%TVRage_Type. [ $+ [ %num ] ] == Schedule) || (%TVRage_Type. [ $+ [ %num ] ] == Country) { msg %TVRage_TargetC. [ $+ [ %num ] ] 5PM14'5iNG $+(13,%TVRage_Target. [ $+ [ %num ] ],) the program schedule for $+(3,%TVRage_Date. [ $+ [ %num ] ],) $+(15,$chr(40),7,$iif(%TVRage_Country. [ $+ [ %num ] ],$v1,US),$iif(%TVRage_Time_Schedule. [ $+ [ %num ] ],$+($chr(32),14-4#14-) $+(15,$v1) 14PM),15,$chr(41),) | sockwrite -n $SockName GET $+(/tools/quickschedule.php,$iif(%TVRage_Type. [ $+ [ %num ] ] == Country,$+(?country=,%TVRage_Country. [ $+ [ %num ] ]))) HTTP/1.1 }
;*******************************************************************************************************
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 }
;****************************************************************************************
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 }
;************************************
set %TVRage_Day. [ $+ [ %num ] ] 0
;************************************
sockwrite -n $sockname Host: $iif(%HOST,$v1,services.tvrage.com)
sockwrite -n $sockname Connection: keep-alive
sockwrite $sockname $crlf
}
on *:sockread:TVRage.*: { var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
if ($sockerr) { return }
var %TVRead | sockread %TVRead
;************************************************************************************************************************************
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 }
;*** Testing
; $iif(%TVRead != $null,echo -at $+(5,$replace($remove($v1,<pre>),@,15@14)))
;***********************************************************************************
;*** Show summary
if (%show_ID+. [ $+ [ %num ] ]) {
if (<image> isin %TVRead) { set %show_PiC [ $+ [ %num ] ] $nohtml(%TVRead) }
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 }
elseif ($regex(%TVRead,<[^<>]+>) == 0) { $iif(%TVRead != $null,write tvrage.txt $replaceLiNK($v1)) }
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,))
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 }
return
}
;************************************************************************************************************************************
;*** Schedule
elseif (%TVRage_Type. [ $+ [ %num ] ] = Schedule) || (%TVRage_Type. [ $+ [ %num ] ] = Country) {
;*** DAY
if ($mid(%TVRead,1,5) = [DAY]) { if ($Fopen(%TVRage_Day. [ $+ [ %num ] ])) { .fclose %TVRage_Day. [ $+ [ %num ] ] } | set -u17 %TVRage_Day. [ $+ [ %num ] ] $GetTok($Mid(%TVRead,6,$calc($pos(%TVRead,[/,1) - 6)),1,44) | if (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) { .fopen -no %TVRage_Day. [ $+ [ %num ] ] [ %TVRage_Day. [ $+ [ %num ] ] ] [ $+ [ %num ] ] $+ .txt | .fwrite -n %TVRage_Day. [ $+ [ %num ] ] $Mid(%TVRead,6,$calc($pos(%TVRead,[/,1) - 6)) } }
;*** TiME
if ($regex(%TVRead,/\[TIME\](.*)\[\/TIME\]/i)) { set -u7 %sTiME $ascTime($cTime($date $regml(1)),HH:nn) }
;*** SHOW
if ($regex(%TVRead,/\[SHOW\](.*)\[\/SHOW\]/i)) && (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) { set -u2 %TVRead_NetW $strip($remove($mid(%TVRead,$pos(%TVRead,]),$calc($pos(%TVRead,^,1) -$pos(%TVRead,],1))),])) | set -u2 %TVRead_TiTLE $strip($remove($mid(%TVRead,$pos(%TVRead,^,1),$calc($pos(%TVRead,^,2) -$pos(%TVRead,^,1))),^)) | set -u2 %TVRead_EP $strip($remove($mid(%TVRead,$pos(%TVRead,^,2),$calc($pos(%TVRead,^,3) -$pos(%TVRead,^,2))),^)) | set -u2 %TVRead_LiNK $strip($remove($mid(%TVRead,$pos(%TVRead,^,3),$calc($pos(%TVRead,[,2) -$pos(%TVRead,^,3))),^)) | set -u2 %TVRead_SHOW $+(4,[14,%sTiME,4]) $+(15,%TVRead_TiTLE,) 14-4#14- $+(14,$replace(%TVRead_EP,x,15x14),) 14-4#14- $+(8,%TVRead_NetW,) $+(,$chr(40),2,%TVRead_LiNK,,$chr(41),) | .fwrite -n %TVRage_Day. [ $+ [ %num ] ] %TVRead_SHOW }
return
}
if (!$sockbr) return
;************************************************************************************************************************************
;*** !TV / !EP / !SHOW / !NEXT / !N / !LAST / !L
elseif ($regex($strip(%TVRead),/Show ID@(.*)/)) { set %show_ID. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/Show Name@(.*)/)) { set %show_Name. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/Show URL@(.*)/)) { set %show_Link. [ $+ [ %num ] ] $remove($regml(1),http://) }
elseif ($regex($strip(%TVRead),/Premiered@(.*)/)) { set %show_Started. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/Started@(.*)/)) { set %show_Started+. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/Ended@(.*)/)) { set %show_Ended. [ $+ [ %num ] ] $regml(1) }
; elseif ($regex($strip(%TVRead),/Episode Info@(.*)/)) { set %show_EP. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/Episode URL@(.*)/)) { set %show_URL. [ $+ [ %num ] ] $remove($regml(1),http://) }
; elseif ($regex($strip(%TVRead),/Latest Episode@(.*)/)) { set %show_Last. [ $+ [ %num ] ] $regml(1) }
; elseif ($regex($strip(%TVRead),/Next Episode@(.*)/)) { set %show_Next. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/RFC3339@(.*)/)) { set %show_RFC. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/GMT+0 NODST@(.*)/)) { set %show_GMT. [ $+ [ %num ] ] $regml(1) }
;* ^ 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)
elseif ($regex($strip(%TVRead),/Country@(.*)/)) { set %show_Country. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/Status@(.*)/)) { set %show_Status. [ $+ [ %num ] ] $replace($regml(1),Return,9Return,Final,3Final,Canceled/Ended,4Canceled,New,8New) }
elseif ($regex($strip(%TVRead),/Classification@(.*)/)) { set %show_Class. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/Genres@(.*)/)) { set %show_Genre. [ $+ [ %num ] ] $regml(1) }
elseif ($regex($strip(%TVRead),/Network@(.*)/)) { set %show_Network. [ $+ [ %num ] ] $regml(1) }
; elseif ($regex($strip(%TVRead),/Airtime@(.*)/)) { set %show_Airtime. [ $+ [ %num ] ] $replace($regml(1),day,days,pm,PM,am,AM) }
; elseif ($regex($strip(%TVRead),/Runtime@(.*)/)) { set %show_Runtime. [ $+ [ %num ] ] $regml(1) }
;************************************************************************************************************************************
;*** Episode iNFO
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) }
;**********************************************************************************************************************************
;*** Last + Next
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 ] ]) }
;**********************************************************************************************************************************
;*** Airtime (cTime)
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))) }
;**********************************************************************************************************************************
;*** Runtime ( sockclose )
elseif ($regex($strip(%TVRead),/Runtime@(.*)/)) { set %show_Runtime. [ $+ [ %num ] ] $regml(1) | sockclose $sockname | Check.Settings Ep %Num
;*** !SHOW
if (%TVRage_ONLY. [ $+ [ %num ] ] == SHOW) && (%show_ID. [ $+ [ %num ] ]) { $iif(%show_ID. [ $+ [ %num ] ] != $null,TVRage %num $v1) | halt }
;**********************************************************************************************************************************
;*** ERROR - $iif(%show_Last_Airdate+. [ $+ [ %num ] ],$+($chr(40),15,$replace($v1,/,14/15),,$chr(41))))
elseif (!%show_Next. [ $+ [ %num ] ]) && (%TVRage_ONLY. [ $+ [ %num ] ] == NEXT) { goto TVRage_iNFO }
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 }
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 }
;**********************************************************************************************************************************
;*** EPSpecs
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 }
;*** SHOW iNFO / MSG
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) }
;*** !LAST
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),))) }
;*** !NEXT
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),)))) }
:ENDiTNOW
unset %TVRead* %tvshow* [ $+ [ %num ] ] %show_* [ $+ [ %num ] ] %TVRage_* [ $+ [ %num ] ] %Check_* [ $+ [ %num ] ] %next_* [ $+ [ %num ] ] %show_* [ $+ [ %num ] ]
}
}
on *:sockclose:TVRage.*:{ var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
;**** !TODAY / !TOMORROW ( As in program schedule )
if ((%TVRage_Type. [ $+ [ %num ] ] = Schedule) || (%TVRage_Type. [ $+ [ %num ] ] = Country)) { Check.Settings Sch %Num | if (%TVRage_Date. [ $+ [ %num ] ] != $null) { .fopen %TVRage_Date. [ $+ [ %num ] ] [ %TVRage_Date. [ $+ [ %num ] ] ] [ $+ [ %num ] ] $+ .txt | set -u17 %TVRage_DATE+ [ $+ [ %num ] ] $+(15,$fread(%TVRage_Date. [ $+ [ %num ] ])) | while ($Feof != 1) { set -u2 %TVRage_Tmp. [ $+ [ %num ] ] $Fread(%TVRage_Date. [ $+ [ %num ] ]) | set -u2 %TVRage_Time_Temp. [ $+ [ %num ] ] $remove(%TVRage_Tmp. [ $+ [ %num ] ],$GetTok(%TVRage_Tmp. [ $+ [ %num ] ],2,93),[,]) | if (!%NOTHiNGFOUD) { set -u17 %NOTHiNGFOUD 1 | .TiMER-TV-SCHEDULE 1 3 $iif(%TVRage_Target. [ $+ [ %num ] ],msg $v1,echo -at) [4ERROR] 14There are no new TV Shows Scheduled for $+(04,%TVRage_Time_Schedule. [ $+ [ %num ] ],15:0400 $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] < 12,14PM,14AM),) } | if (%TVRage_Time_Schedule. [ $+ [ %num ] ] == $null) || ((%TVRage_Time_Schedule. [ $+ [ %num ] ] != $null) && ($mid($strip(%TVRage_Time_Temp. [ $+ [ %num ] ]),1,2) == $int($replacex($mid(%TVRage_Time_Schedule. [ $+ [ %num ] ],1,2),5,17,6,18,7,19,8,20,9,21,10,22,11,23,12,00)))) { .TiMER-TV-SCHEDULE OFF | $iif(%NOTHiNGFOUD == 1,$iif(%TVRage_Target. [ $+ [ %num ] ],.msg $v1,echo -at) 05Schedule for %TVRage_DATE+ [ $+ [ %num ] ] $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ],5at $+(15,$replacexcs($v1,5,17,6,18,7,19,8,20,9,21,10,22,11,23,12,00),14:1500) $iif($replacexcs(%TVRage_Time_Schedule. [ $+ [ %num ] ],5,17,6,18,7,19,8,20,9,21,10,22,11,23,12,00) > 12,14PM,14AM))) | $iif(%TVRage_Target. [ $+ [ %num ] ],.msg $v1,echo -at) $replaceLiNK(%TVRage_Tmp. [ $+ [ %num ] ]) | inc -u3 %NOTHiNGFOUD } } } | .fclose %TVRage_Date. [ $+ [ %num ] ] | .remove [ %TVRage_Date. [ $+ [ %num ] ] ] [ $+ [ %num ] ] $+ .txt }
.unset %tvshow* [ $+ [ %num ] ] %show_* [ $+ [ %num ] ] %TVRage_* [ $+ [ %num ] ] %Check_* [ $+ [ %num ] ] %next_* [ $+ [ %num ] ]
}
;**********************************************************************************************************************************
;*** TVPlot
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 }
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 }
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)) } }
;**********************************************************************************************************************************
;*** Dialog section
dialog -l TVSettings {
title "TVRage Settings"
size -1 -1 264 217
option pixels
box "", 1, 8 8 249 60
box "", 2, 8 67 249 60
box "", 3, 8 126 249 43
box "", 12, 8 168 249 43
text "Select where you want the Schedule Displayed", 4, 16 21 225 17
radio "Channel", 5, 32 45 65 13, group
radio "Private Message", 6, 128 45 105 13,
text "Select where you want the Replys Displayed", 7, 16 80 225 17
radio "Channel", 8, 32 104 65 13, group
radio "Private Message", 9, 128 104 105 13,
check "Enable TVRage", 10, 32 188 113 13
button "&Save Settings", 11, 144 182 89 25, ok
check "Enable Colors", 13, 32 145 113 13
}
on *:dialog:TVSettings:*:*:{
if ($Devent == init) {
if (%TV_Where = 1) { did -c $dname 8 }
else { did -c $dname 9 }
if (%TV_Where2 = 1) { did -c $dname 5 }
else { did -c $dname 6 }
if (%TV_Rage = 1) { did -c $dname 10 }
else { did -u $dname 10 }
if (%TV_Color = 1) { did -c $dname 13 }
else { did -u $dname 13 }
}
elseif ($devent == Close) {
set %TV_Where $iif($Did($Dname,8).state = 1,1,0)
set %TV_Where2 $iif($Did($Dname,5).state = 1,1,0)
set %TV_Rage $iif($Did($Dname,10).state = 1,1,0)
set %TV_Color $iif($Did($Dname,13).state = 1,1,0)
echo -at 14TVRage Settings have been saved.
}
}
dialog -l SelfSearch {
title "TVRage Search"
size -1 -1 500 202
option pixels
box "", 1, 8 8 486 145
box "", 2, 8 152 486 43
text "Search Options:", 3, 16 16 462 17
text "<Show> (Season and Episode) EX: House 2x05", 4, 30 33 462 17
text "Schedule <Day of Week> EX: Schedule Fri", 5, 30 50 462 17
text "Schedule <Day of Week> (Time) EX: Schedule Wed 10", 6, 30 67 462 17
text "Schedule <Day of Week> (Time) (Country:US,GB,UK,AU) EX: Schedule Saturday 10 GB", 7, 30 84 462 17
text "Option in ( ) are Optional. Options in < > are Required.", 8, 30 101 462 17
edit "", 9, 16 125 462 17, autohs
button "Search", 10, 335 165 65 25
button "Cancel", 11, 414 165 65 25, cancel
}
on *:dialog:SelfSearch:sclick:*:{
if ($Did = 10) && ($Did(9) = $null) && ($dialog(error,error,-4)) { did -f $Dname 9 }
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 }
}
dialog -l error {
title "Error"
size -1 -1 228 90
option pixels
box "", 2, 8 8 214 33
box "", 3, 8 40 214 43
button "&Ok", 4, 160 52 50 25, ok
text "DOH! - You must type something to search for!", 5, 20 20 190 17
}
;*** END TVRage section ****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
First of all... sorry for the late reply... haven't really done any coding the last couple of years
Anyways... haven't had a look at TVDB's api... but have made one for TVMaze's api...
Not something I currently wanna share tho... since it's not really user friendly
but will have a look now and see if anything else is out...
if not I might give My script some makeup on and upload a version that's a bit more user friendly then what I'm using
[4:36pm] - !SHOW EX: !SHOW House ooO( Get show description )
[4:36pm] - !N / !L EX: !N Ideal / !L Ideal ooO( Get information for next / last episode )
[4:36pm] - !EP (Season and Episode) EX: !EP The IT Crowd 3x05 ooO( Get general show information and episode summary (if season and episode is given) )
[4:36pm] - !EP Schedule (Time) (Country) EX: !EP Schedule Fri 10 AU Country: GB, UK and AU (US by default) ooO( Get program schedule for the requested day (Time and/or Country) )
[4:36pm] - NOTE: Options in ( ) are optional... and options in < > are required.
Ok so I am using mIRC 7.22, this works well BUT, the moment I type !today and it pm's the schedule... any command after that keeps saying the same message. !tv arrow (pm'ing schedule to so and so regardless of the command). I also got this error:
Hope that helps
@jasonh iDK... am running 6.35 Myself... but have been told it's working on 7.20... so a update might fix your problem
@James405 Must be version issue... I get only next when doing !N and I got show info when doing !SHOW... neither anything like !TV
@hxck Thanks :D
@x714x This must be because you have aliaes named the same... darkengine doesn't activate it here anyways
Script is randomly triggered from other stuff, i.e. system info script.
Here darkengine triggers it... http://picpit.net/images/A4cbV.jpg
working fine for me! only issue I've just noticed is that no matter what command I use (!tv !show !n etc) I get the response of !tv. I only noticed as I wanted to use the !show command to show the summary but could not get it to work!
Also how would you feel about a !sum command to just respond with the show summary?
Thanks for the script! :)
Same here, seems unlikely tvrage will be returning in the near future. Would be amazing to see this ported over to the tvdb