This allows the users of a channel of the user to search TVRage.com. They can look up separate shows, or look up schedules. also can search other countries TV shows.
Upon load a dialog will appear with settings. if they need to be adjusted, there is a menu for it.
Updates to work with new TVRage website.
Fixed Issue where it quit working.
on *:LOAD:dialog -m TVSettings TVSettings -4
on *:UNLOAD:.unset %TV_*
menu Menubar,Channel,Query {
-
TV Rage
.Settings:dialog -m TVSettings TVSettings -4
.Self Search:dialog -m SelfSearch SelfSearch -4
.Status < $+ $iif(%TV_Rage = 1,Enabled,Disabled) $+ >:$iif(%TV_Rage = 0,%TV_Rage = 1,%TV_Rage = 0) | echo -a TV Rage Has Been $iif(%TV_Rage = 1,Enabled.,Disabled.)
-
}
On *:input:#: {
if ($1 != !tv) { return }
if (%TV_Rage = 0) { Halt }
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-
}
On *:Text:!tv*:#: {
if (%TV_Rage = 0) { Halt }
var %Num = $trnum
if ($2 = Schedule) { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where2 = 1,$Nick,$Chan) }
elseif ($Target !ischan) { set %TVRage_Target. [ $+ [ %num ] ] $Nick | set %TVRage_Query. [ $+ [ %num ] ] 1 }
else { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where = 1,$Chan,$Nick) }
set %TVRage_Nick. [ $+ [ %num ] ] $Nick
set %TVRage_Chan. [ $+ [ %num ] ] $Chan
TVRage.Load %num $1-
}
alias -l TVRage.Load {
var %num = $1
if ($Mid($2,4,10) = triggers) {
msg %TVRage_Target. [ $+ [ %num ] ] 14TVRage Commands8:
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!tv 8<15Show8> (15Season and Episode8) 4EX8:15 !tv House 2x05 This Command P.M's you.
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!tv Schedule <day> (time) Will display the Tvrage schedule for the sated day.
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!tvrage <Show> Will display Info in channel of the show you requested.
msg %TVRage_Target. [ $+ [ %num ] ] 8- 14Options in 8( ) 14are Optional8. 14Options in 8< > 14are Required8.
.unset %TVRage*
halt
}
tokenize 32 $2-
if ($2 = Schedule) {
var %temp $GetTok($2-,$numtok($2-,32),32)
set %TVRage_Type. [ $+ [ %num ] ] Schedule
if ((%Temp = GB) || (%Temp = UK) || (%Temp = US) || (%Temp = AU)) { set %TVRage_Type. [ $+ [ %num ] ] Country | set %TVRage_Country. [ $+ [ %num ] ] %Temp }
set %TVRage_Time_Schedule. [ $+ [ %num ] ] $iif($4 !isnum,$null,$Int($4))
set %TVRage_Date. [ $+ [ %num ] ] $FullDate($3)
if (%TVRage_Date. [ $+ [ %num ] ] = $null) {
msg %TVRage_Target. [ $+ [ %num ] ] 14You need to pick a 4Day of the Week $+ $iif(!%TVRage_Country. [ $+ [ %num ] ],$chr(32) $+ 14or 4Country) $+ 8.
.unset %TVRage_*. [ $+ [ %num ] ]
.unset %Check_*. [ $+ [ %num ] ]
halt
}
TVRage %Num Schedule
}
else {
$iif($CheckEP(%num,$2-) = 1,set %TVRage_Type. [ $+ [ %num ] ] EpSpec, set %TVRage_Type. [ $+ [ %num ] ] Ep)
TVRage %num $2-
}
}
alias -l TVRage {
if ((%TVRage_Type. [ $+ [ $1 ] ] != Schedule) && (!$2)) {
msg %TVRage_Target. [ $+ [ $1 ] ] 14You actually need to search for a 4TV8-4show 14you know8! 14 Type 4!tvtriggers14 for help8.
.unset %TVRage_*. [ $+ [ $1 ] ]
return
}
if (%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
}
on *:sockopen:TVRage.*: {
var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
Check.Settings Sch %Num
if ($sockerr > 0) return
if (%TVRage_Type. [ $+ [ %num ] ] = Schedule) {
msg %TVRage_Target. [ $+ [ %num ] ] 15-- 14Gathering Information 15--
sockwrite -nt $SockName GET /tools/quickschedule.php HTTP/1.1
}
elseif (%TVRage_Type. [ $+ [ %num ] ] = Country) {
msg %TVRage_Target. [ $+ [ %num ] ] 15-- 14Gathering Information 15--
sockwrite -nt $SockName GET /tools/quickschedule.php?country= $+ %TVRage_Country. [ $+ [ %num ] ] HTTP/1.1
}
elseif ((%TVRage_Type. [ $+ [ %num ] ] = Ep) || (%TVRage_Type. [ $+ [ %num ] ] = EpSpec)) { sockwrite -nt $sockname GET /tools/quickinfo.php?show= $+ %tvshow. [ $+ [ %num ] ] HTTP/1.0 }
set %TVRage_Day. [ $+ [ %num ] ] 0
sockwrite -nt $sockname Host: services.tvrage.com
sockwrite -nt $sockname $crlf
}
on *:sockread:TVRage.*:{
var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
if ($sockerr) { return }
var %tvdata
sockread %tvdata
if ($mid(%Tvdata,1,5) = [DAY]) {
if ($Fopen(%TVRage_Day. [ $+ [ %num ] ])) {
.fclose %TVRage_Day. [ $+ [ %num ] ]
}
set %TVRage_Day. [ $+ [ %num ] ] $GetTok($Mid(%Tvdata,6,$Calc($pos(%Tvdata,[/,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(%Tvdata,6,$Calc($pos(%Tvdata,[/,1) - 6))
}
}
if ($mid(%TvData,1,6) = [TIME]) {
if (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) {
set %TVRage_Time. [ $+ [ %num ] ] $Mid(%Tvdata,7,$Calc($pos(%tvdata,[/,1) - 7))
}
}
if ($Mid(%TVData,1,6) = [SHOW]) {
if (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) {
set %TVRage_Show_Temp. [ $+ [ %num ] ] $Mid(%TvData,7,$Calc($pos(%Tvdata,^,3) - 7))
.fwrite -n %TVRage_Day. [ $+ [ %num ] ] %TVRage_Time. [ $+ [ %num ] ] $+ ^ $+ %TVRage_Show_Temp. [ $+ [ %num ] ]
}
}
if (!$sockbr) return
if (show name isin %tvdata) { set %show_name. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (country isin %tvdata) { set %show_country. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (Latest Episode isin %tvdata) {
set %show_latest_temp. [ $+ [ %num ] ] $gettok(%tvdata,2,64)
set %show_latest_Ep. [ $+ [ %num ] ] $gettok(%show_latest_Temp. [ $+ [ %num ] ],1,94)
set %show_latest_Title. [ $+ [ %num ] ] $gettok(%show_latest_temp. [ $+ [ %num ] ],2,94)
set %show_latest_airdate. [ $+ [ %num ] ] $gettok(%Show_latest_Temp. [ $+ [ %num ] ],3,94)
}
if (Next Episode isin %tvdata) {
set %show_next_temp. [ $+ [ %num ] ] $gettok(%tvdata,2,64)
set %show_next_Ep. [ $+ [ %num ] ] $gettok(%show_next_Temp. [ $+ [ %num ] ],1,94)
set %show_next_Title. [ $+ [ %num ] ] $gettok(%show_next_temp. [ $+ [ %num ] ],2,94)
set %show_next_airdate. [ $+ [ %num ] ] $gettok(%Show_Next_Temp. [ $+ [ %num ] ],3,94)
}
if (Show URL isin %tvdata) { set %Show_URL. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (Episode Info isin %tvdata) {
set %Show_Spec_Temp. [ $+ [ %num ] ] $Gettok(%tvdata,2,64)
set %show_Spec_Ep. [ $+ [ %num ] ] $gettok(%show_spec_Temp. [ $+ [ %num ] ],1,94)
set %show_Spec_Title. [ $+ [ %num ] ] $gettok(%show_spec_temp. [ $+ [ %num ] ],2,94)
set %show_Spec_airdate. [ $+ [ %num ] ] $gettok(%Show_spec_Temp. [ $+ [ %num ] ],3,94)
if (%show_Spec_airdate. [ $+ [ %num ] ] = 00//00) { set %show_Spec_airdate. [ $+ [ %num ] ] }
}
if (Status isin %Tvdata) { set %Show_Status. [ $+ [ %num ] ] $Gettok(%Tvdata,2,64) }
if (airtime isin %Tvdata) { Set %Show_Airtime. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (network isin %Tvdata) { set %Show_network. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (%show_Next_airdate. [ $+ [ %num ] ]) {
set %Next_Temp. [ $+ [ %num ] ] $puttok(%Show_Next_Airdate. [ $+ [ %num ] ],$GetTok(%Show_Next_airdate. [ $+ [ %num ] ],2,47),1,47)
set %Next_Temp. [ $+ [ %num ] ] $puttok(%Next_Temp. [ $+ [ %num ] ],$SetMonth($GetTok(%Show_Next_Airdate. [ $+ [ %num ] ] ,1,47)),2,47)
set %Next_Time. [ $+ [ %num ] ] $CTime(%Next_Temp. [ $+ [ %num ] ] $GetTok(%Show_Airtime. [ $+ [ %num ] ] ,3-4,32))
}
if (%Show_Spec_airdate. [ $+ [ %num ] ]) {
set %Next_Spec_Temp. [ $+ [ %num ] ] $puttok(%Show_Spec_Airdate. [ $+ [ %num ] ],$SetMonth($GetTok(%Show_Spec_Airdate. [ $+ [ %num ] ],2,47)),2,47)
set %Next_Spec_Time. [ $+ [ %num ] ] $CTime(%Next_Spec_Temp. [ $+ [ %num ] ] $GetTok(%Show_Airtime. [ $+ [ %num ] ] ,3-4,32))
}
}
on *:sockclose:TVRage.*:{
var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
if ((%TVRage_Type. [ $+ [ %num ] ] = Ep) || (%TVRage_Type. [ $+ [ %num ] ] = EpSpec)) {
Check.Settings Ep %Num
set %Show_Ep. [ $+ [ %num ] ] s $+ $replace(%Show_ep. [ $+ [ %num ] ],x,e)
if (%show_name. [ $+ [ %num ] ] = $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14No Such Show8, 14Check your spelling and try again8. }
else {
msg %TVRage_Target. [ $+ [ %num ] ] 14 $+ %show_name. [ $+ [ %num ] ] 15--14 $Replace(%Show_Airtime. [ $+ [ %num ] ],$Chr(44),8 $+ $chr(44) $+ 14,:,8:14) 15 $+ %Show_network. [ $+ [ %num ] ] 8(14 $+ %Show_Status. [ $+ [ %num ] ] $+ 8) (14 $+ %show_country. [ $+ [ %num ] ] $+ 8)
if (%Show_Url. [ $+ [ %num ] ] != $Null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Episode URL8:15 %Show_URL. [ $+ [ %num ] ] }
if (%show_Spec_temp. [ $+ [ %num ] ] != $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Episode15 %Show_spec_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_spec_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %Show_spec_Title. [ $+ [ %num ] ] $iif(%Next_Spec_Time. [ $+ [ %num ] ] > $Ctime,14Airing in8:15 $LongTime($Calc(%Next_Spec_Time. [ $+ [ %num ] ] - $Ctime))) }
msg %TVRage_Target. [ $+ [ %num ] ] 14Latest Episode15 %Show_Latest_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_Latest_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %show_latest_Title. [ $+ [ %num ] ]
if (%show_next_temp. [ $+ [ %num ] ] != $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Next Episode15 %Show_next_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_Next_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %Show_Next_Title. [ $+ [ %num ] ] $iif(%Next_Time. [ $+ [ %num ] ] > $Ctime,14Airing in8:15 $LongTime($Calc(%Next_Time. [ $+ [ %num ] ] - $Ctime))) }
}
}
elseif ((%TVRage_Type. [ $+ [ %num ] ] = Schedule) || (%TVRage_Type. [ $+ [ %num ] ] = Country)) {
Check.Settings Sch %Num
if ($Fopen(%TVRage_Day. [ $+ [ %num ] ])) { .fclose %TVRage_Day. [ $+ [ %num ] ] }
if (%TVRage_Date. [ $+ [ %num ] ] != $Null) {
.fopen %TVRage_Date. [ $+ [ %num ] ] [ %TVRage_Date. [ $+ [ %num ] ] ] [ $+ [ %num ] ] $+ .txt
msg %TVRage_Target. [ $+ [ %num ] ] 14Schedule for15 $replace($fread(%TVRage_Date. [ $+ [ %num ] ]),$chr(44),8 $+ $chr(44) $+ 15) $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] != $null, 14at15 %TVRage_Time_Schedule. [ $+ [ %num ] ] $+ 8:1500 $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] < 12,14pm,14am))
set %TVRage_Time_Count. [ $+ [ %num ] ] 0
while (!$feof) && (!$ferr) {
set %TVRage_Tmp. [ $+ [ %num ] ] $Fread( [ %TVRage_Date. [ $+ [ %num ] ] ] )
set %TVRage_Time_Temp. [ $+ [ %num ] ] $GetTok(%TVRage_Tmp. [ $+ [ %num ] ],1,94)
set %TVRage_Show_NetWork. [ $+ [ %num ] ] $GetTok(%TVRage_Tmp. [ $+ [ %num ] ],2,94)
set %TVRage_Show_Show. [ $+ [ %num ] ] $gettok(%TVRage_Tmp. [ $+ [ %num ] ],3,94)
set %TVRage_Show_Ep. [ $+ [ %num ] ] s $+ $replace($getTok(%TVRage_Tmp. [ $+ [ %num ] ],4,94),x,e)
if (%TVRage_Tmp. [ $+ [ %num ] ] = $null) { goto done }
if (%TVRage_Time_Schedule. [ $+ [ %num ] ] != $Null) {
if ($int($mid(%TVRage_Time_Temp. [ $+ [ %num ] ],1,2)) = $int($mid(%TVRage_Time_Schedule. [ $+ [ %num ] ],1,2))) {
inc %TVRage_Time_Count. [ $+ [ %num ] ] 1
if (%TVRage_Time_Temp2. [ $+ [ %num ] ] = %TVRage_Time_Temp. [ $+ [ %num ] ]) { goto Next_Time }
msg %TVRage_Target. [ $+ [ %num ] ] 14Time8:15 8(15 $+ $Replace(%TVRage_Time_Temp. [ $+ [ %num ] ],:,8:15) $+ 8)
:Next_Time
msg %TVRage_Target. [ $+ [ %num ] ] 14--- 8(15 $+ %TVRage_show_Network. [ $+ [ %num ] ] $+ 8)15 %TVRage_Show_Show. [ $+ [ %num ] ] 8-15 $Replace(%TVRage_Show_Ep. [ $+ [ %num ] ],s,14s15,e,14e15)
Set %TVRage_Time_Temp2. [ $+ [ %num ] ] %TVRage_Time_Temp. [ $+ [ %num ] ]
}
}
if (%TVRage_Time_Schedule. [ $+ [ %num ] ] != $Null) && (%TVRage_Time_Count. [ $+ [ %num ] ] = 0)) { msg %TVRage_Target. [ $+ [ %num ] ] 14There are no new TV Shows Scheduled for15 %TVRage_Time_Schedule. [ $+ [ %num ] ] $+ 8:1500 $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] < 12,14pm,14am) }
elseif (%TVRage_Time_Schedule. [ $+ [ %num ] ] = $Null) {
if (%TVRage_Time_Temp2. [ $+ [ %num ] ] = %TVRage_Time_Temp. [ $+ [ %num ] ]) { goto Next_Time2 }
msg %TVRage_Target. [ $+ [ %num ] ] 14Time8:15 8(15 $+ $Replace(%TVRage_Time_Temp. [ $+ [ %num ] ],:,8:15) $+ 8)
:Next_Time2
msg %TVRage_Target. [ $+ [ %num ] ] 14--- 8(15 $+ %TVRage_show_Network. [ $+ [ %num ] ] $+ 8)15 %TVRage_Show_Show. [ $+ [ %num ] ] 8-15 $replace(%TVRage_Show_Ep. [ $+ [ %num ] ],e,14e15,s,14s15)
Set %TVRage_Time_Temp2. [ $+ [ %num ] ] %TVRage_Time_Temp. [ $+ [ %num ] ]
}
}
:done
}
.fclose %TVRage_Date. [ $+ [ %num ] ]
.remove [ %TVRage_Date. [ $+ [ %num ] ] ] [ $+ [ %num ] ] $+ .txt ]
}
.unset %tvshow. [ $+ [ %num ] ]
.unset %show_*. [ $+ [ %num ] ]
.unset %TVRage_*. [ $+ [ %num ] ]
.unset %Check_*. [ $+ [ %num ] ]
.unset %next_*. [ $+ [ %num ] ]
}
Alias -l FullDate {
if ($Mid($1,1,3) = Sat) { Return Saturday }
elseif ($Mid($1,1,3) = Sun) { return Sunday }
elseif ($Mid($1,1,3) = Mon) { Return Monday }
elseif ($Mid($1,1,3) = Tue) { Return Tuesday }
elseif ($Mid($1,1,3) = Wed) { Return Wednesday }
elseif ($Mid($1,1,3) = Thu) { Return Thursday }
elseif ($Mid($1,1,3) = Fri) { Return Friday }
else { Return $null }
}
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 }
}
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 -a 4TV Rage 15Settings have been saved8.
}
}
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) {
if ($Did(9) = $null) {
if ($dialog(error,error,-4)) { did -f $Dname 9 }
}
else {
var %Num = $trnum
set %TVRage_Target. [ $+ [ %num ] ] $me
set %TVRage_Nick. [ $+ [ %num ] ] $me
set %TVRage_Chan. [ $+ [ %num ] ] $me
TVRage.Load %num !tv $did(9).text
echo -a 14Check you Private Message for the infomation that you requested8.
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 "You must type something to search for!", 5, 20 20 190 17
}
alias -l Check.Settings {
if ($1 = Ep) {
if (%TV_Where = $Null) { Set %TV_Where 0 }
if (%TV_Where = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
elseif (%TV_Where = 0) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
if (%TVRage_Query. [ $+ [ $2 ] ] = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
}
elseif ($1 = Sch) {
if (%TV_Where2 = $Null) { Set %TV_Where2 0 }
if (%TV_Where2 = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
elseif (%TV_Where2 = 0) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
if (%TVRage_Query. [ $+ [ $2 ] ] = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
}
}
alias -l trnum {
set %trnum $base($calc($base(%trnum,36,10) +1),10,36)
return %trnum
}
Alias -l LongTime {
Return 15 $+ $replace($Duration($$1),sec,sc,day,dy,wks,14weeks15,wk,14week15,dys,14days15,dy,14day15,hrs,14hours15,hr,14hour15,min,14minute15,mins,14minutes15,scs,14seconds15,sc,14second15)
}
alias -l SetMonth {
if ($1 = Jan) { return 1 }
elseif ($1 = Feb) { Return 2 }
elseif ($1 = Mar) { Return 3 }
elseif ($1 = Apr) { Return 4 }
elseif ($1 = May) { Return 5 }
elseif ($1 = Jun) { Return 6 }
elseif ($1 = Jul) { Return 7 }
elseif ($1 = Aug) { Return 8 }
elseif ($1 = Sep) { Return 9 }
elseif ($1 = Oct) { Return 10 }
elseif ($1 = Nov) { Return 11 }
elseif ($1 = Dec) { Return 12 }
}
alias -l msg {
if (%TV_Color = 0) { var %Temp = $strip($1-) | tokenize 32 %Temp }
if ($Show) {
if ($1 !ischan) { !.msg $1 $2- }
else { !msg $1 $iif(c isincs $chan($1).mode,$Strip($2-),$2-) }
}
else { !.msg $1 $iif(c isincs $chan($1).mode,$Strip($2-),$2-) }
}
I've look at the code and it seems that it work intermittently. Don't know if its and issue with TVRage.com or not. But i have another script written in TCL and it is basically the same thing and it seems to be working perfectly. Not sure what is wrong with this one. When i get a chance I'll go through the code entirely and see whats going on.
Not sure if the original or any of the pasted edits above are working @James405
But a quick search here on hawkee should give you at least a couple of working ones.
And you can always try the SRU edit http://www.hawkee.com/snippet/9506
Off-Topic:
Sounds awesome... hope to see you post it :D
(More or less)Back to topic:
It's a easy fix making it work with !NEXT and/or !LAST.
And once again thanks for the help ^^^^
I was sure it wasn't just Me that had the problem... but got it working now :D
EDIT:
Me too :P hehe
I appreciate it joelp53 ^^
It must have been My script that was F'ed...
But added yours and tested and it worked... so much appreciated...
Just finished making it run like My old one... only missing the link add-on :P
[12:16:26] <~MashhitDK> !NEXT Weeds
[12:16:27] <~SRU> Next Episode Nov/01/2010 06x11 Viking Pride Airing in: 6days 9hours 43minutes 33seconds
Well i have the exact code as above and it works perfectly for me.
Edit just incase here is my working script:
on *:LOAD:dialog -m TVSettings TVSettings -4
on *:UNLOAD:.unset %TV_*
menu Menubar,Channel,Query {
-
TV Rage
.Settings:dialog -m TVSettings TVSettings -4
.Self Search:dialog -m SelfSearch SelfSearch -4
.Status < $+ $iif(%TV_Rage = 1,Enabled,Disabled) $+ >:$iif(%TV_Rage = 0,%TV_Rage = 1,%TV_Rage = 0) | echo -a TV Rage Has Been $iif(%TV_Rage = 1,Enabled.,Disabled.)
-
}
On *:input:#: {
if ($1 != .tv) { return }
if (%TV_Rage = 0) { Halt }
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-
}
On *:Text:.tv*:#: {
if (%TV_Rage = 0) { Halt }
var %Num = $trnum
if ($2 = Schedule) { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where2 = 1,$Nick,$Chan) }
elseif ($Target !ischan) { set %TVRage_Target. [ $+ [ %num ] ] $Nick | set %TVRage_Query. [ $+ [ %num ] ] 1 }
else { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where = 1,$Chan,$Nick) }
set %TVRage_Nick. [ $+ [ %num ] ] $Nick
set %TVRage_Chan. [ $+ [ %num ] ] $Chan
TVRage.Load %num $1-
}
alias -l TVRage.Load {
var %num = $1
if ($Mid($2,4,10) = cmds) {
msg %TVRage_Target. [ $+ [ %num ] ] 14TVRage Commands8:
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15.tv 8<15Show8> (15Season and Episode8) 4EX8:15 .tv House 2x05 This Command P.M's you.
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15.tv Schedule <day> (time) Will display the Tvrage schedule for the sated day.
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!tvrage <Show> Will display Info in channel of the show you requested.
msg %TVRage_Target. [ $+ [ %num ] ] 8- 14Options in 8( ) 14are Optional8. 14Options in 8< > 14are Required8.
.unset %TVRage*
halt
}
tokenize 32 $2-
if ($2 = scehdule) {
var %temp $GetTok($2-,$numtok($2-,32),32)
set %TVRage_Type. [ $+ [ %num ] ] Schedule
if ((%Temp = GB) || (%Temp = UK) || (%Temp = US) || (%Temp = AU)) { set %TVRage_Type. [ $+ [ %num ] ] Country | set %TVRage_Country. [ $+ [ %num ] ] %Temp }
set %TVRage_Time_Schedule. [ $+ [ %num ] ] $iif($4 !isnum,$null,$Int($4))
set %TVRage_Date. [ $+ [ %num ] ] $FullDate($3)
if (%TVRage_Date. [ $+ [ %num ] ] = $null) {
msg %TVRage_Target. [ $+ [ %num ] ] 14You need to pick a 4Day of the Week $+ $iif(!%TVRage_Country. [ $+ [ %num ] ],$chr(32) $+ 14or 4Country) $+ 8.
.unset %TVRage_*. [ $+ [ %num ] ]
.unset %Check_*. [ $+ [ %num ] ]
halt
}
TVRage %Num Schedule
}
else {
$iif($CheckEP(%num,$2-) = 1,set %TVRage_Type. [ $+ [ %num ] ] EpSpec, set %TVRage_Type. [ $+ [ %num ] ] Ep)
TVRage %num $2-
}
}
alias -l TVRage {
if ((%TVRage_Type. [ $+ [ $1 ] ] != Schedule) && (!$2)) {
msg %TVRage_Target. [ $+ [ $1 ] ] 14You actually need to search for a 4TV8-4show 14you know8! 14 Type 4.tvtriggers14 for help8.
.unset %TVRage_*. [ $+ [ $1 ] ]
return
}
if (%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
}
on *:sockopen:TVRage.*: {
var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
Check.Settings Sch %Num
if ($sockerr > 0) return
if (%TVRage_Type. [ $+ [ %num ] ] = Schedule) {
notice %TVRage_Target. [ $+ [ %num ] ] 15-- 14Gathering Information 15--
sockwrite -n $SockName GET /tools/quickschedule.php HTTP/1.1
}
elseif (%TVRage_Type. [ $+ [ %num ] ] = Country) {
notice %TVRage_Target. [ $+ [ %num ] ] 15-- 14Gathering Information 15--
sockwrite -n $SockName GET /tools/quickschedule.php?country= $+ %TVRage_Country. [ $+ [ %num ] ] HTTP/1.1
}
elseif ((%TVRage_Type. [ $+ [ %num ] ] = Ep) || (%TVRage_Type. [ $+ [ %num ] ] = EpSpec)) { sockwrite -n $sockname GET /tools/quickinfo.php?show= $+ %tvshow. [ $+ [ %num ] ] HTTP/1.0 }
sockwrite -n $SockName host: $+(services.tvrage.com,$crlf,$crlf)
set %TVRage_Day. [ $+ [ %num ] ] 0
sockwrite -n $sockname Host: 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 %tvdata
sockread %tvdata
if ($mid(%Tvdata,1,5) = [DAY]) {
if ($Fopen(%TVRage_Day. [ $+ [ %num ] ])) {
.fclose %TVRage_Day. [ $+ [ %num ] ]
}
set %TVRage_Day. [ $+ [ %num ] ] $GetTok($Mid(%Tvdata,6,$Calc($pos(%Tvdata,[/,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(%Tvdata,6,$Calc($pos(%Tvdata,[/,1) - 6))
}
}
if ($mid(%TvData,1,6) = [TIME]) {
if (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) {
set %TVRage_Time. [ $+ [ %num ] ] $Mid(%Tvdata,7,$Calc($pos(%tvdata,[/,1) - 7))
}
}
if ($Mid(%TVData,1,6) = [SHOW]) {
if (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) {
set %TVRage_Show_Temp. [ $+ [ %num ] ] $Mid(%TvData,7,$Calc($pos(%Tvdata,^,3) - 7))
.fwrite -n %TVRage_Day. [ $+ [ %num ] ] %TVRage_Time. [ $+ [ %num ] ] $+ ^ $+ %TVRage_Show_Temp. [ $+ [ %num ] ]
}
}
if (!$sockbr) return
if (show name isin %tvdata) { set %show_name. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (country isin %tvdata) { set %show_country. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (Latest Episode isin %tvdata) {
set %show_latest_temp. [ $+ [ %num ] ] $gettok(%tvdata,2,64)
set %show_latest_Ep. [ $+ [ %num ] ] $gettok(%show_latest_Temp. [ $+ [ %num ] ],1,94)
set %show_latest_Title. [ $+ [ %num ] ] $gettok(%show_latest_temp. [ $+ [ %num ] ],2,94)
set %show_latest_airdate. [ $+ [ %num ] ] $gettok(%Show_latest_Temp. [ $+ [ %num ] ],3,94)
}
if (Next Episode isin %tvdata) {
set %show_next_temp. [ $+ [ %num ] ] $gettok(%tvdata,2,64)
set %show_next_Ep. [ $+ [ %num ] ] $gettok(%show_next_Temp. [ $+ [ %num ] ],1,94)
set %show_next_Title. [ $+ [ %num ] ] $gettok(%show_next_temp. [ $+ [ %num ] ],2,94)
set %show_next_airdate. [ $+ [ %num ] ] $gettok(%Show_Next_Temp. [ $+ [ %num ] ],3,94)
}
if (Episode URL isin %tvdata) { set %Show_URL. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (Episode Info isin %tvdata) {
set %Show_Spec_Temp. [ $+ [ %num ] ] $Gettok(%tvdata,2,64)
set %show_Spec_Ep. [ $+ [ %num ] ] $gettok(%show_spec_Temp. [ $+ [ %num ] ],1,94)
set %show_Spec_Title. [ $+ [ %num ] ] $gettok(%show_spec_temp. [ $+ [ %num ] ],2,94)
set %show_Spec_airdate. [ $+ [ %num ] ] $gettok(%Show_spec_Temp. [ $+ [ %num ] ],3,94)
if (%show_Spec_airdate. [ $+ [ %num ] ] = 00//00) { set %show_Spec_airdate. [ $+ [ %num ] ] }
}
if (Status isin %Tvdata) { set %Show_Status. [ $+ [ %num ] ] $Gettok(%Tvdata,2,64) }
if (airtime isin %Tvdata) { Set %Show_Airtime. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (network isin %Tvdata) { set %Show_network. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (%show_Next_airdate. [ $+ [ %num ] ]) {
set %Next_Temp. [ $+ [ %num ] ] $puttok(%Show_Next_Airdate. [ $+ [ %num ] ],$GetTok(%Show_Next_airdate. [ $+ [ %num ] ],2,47),1,47)
set %Next_Temp. [ $+ [ %num ] ] $puttok(%Next_Temp. [ $+ [ %num ] ],$SetMonth($GetTok(%Show_Next_Airdate. [ $+ [ %num ] ] ,1,47)),2,47)
set %Next_Time. [ $+ [ %num ] ] $CTime(%Next_Temp. [ $+ [ %num ] ] $GetTok(%Show_Airtime. [ $+ [ %num ] ] ,3-4,32))
}
if (%Show_Spec_airdate. [ $+ [ %num ] ]) {
set %Next_Spec_Temp. [ $+ [ %num ] ] $puttok(%Show_Spec_Airdate. [ $+ [ %num ] ],$SetMonth($GetTok(%Show_Spec_Airdate. [ $+ [ %num ] ],2,47)),2,47)
set %Next_Spec_Time. [ $+ [ %num ] ] $CTime(%Next_Spec_Temp. [ $+ [ %num ] ] $GetTok(%Show_Airtime. [ $+ [ %num ] ] ,3-4,32))
}
}
on *:sockclose:TVRage.*:{
var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
if ((%TVRage_Type. [ $+ [ %num ] ] = Ep) || (%TVRage_Type. [ $+ [ %num ] ] = EpSpec)) {
Check.Settings Ep %Num
set %Show_Ep. [ $+ [ %num ] ] s $+ $replace(%Show_ep. [ $+ [ %num ] ],x,e)
if (%show_name. [ $+ [ %num ] ] = $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14No Such Show8, 14Check your spelling and try again8. }
else {
msg %TVRage_Target. [ $+ [ %num ] ] 14 $+ %show_name. [ $+ [ %num ] ] 15--14 $Replace(%Show_Airtime. [ $+ [ %num ] ],$Chr(44),8 $+ $chr(44) $+ 14,:,8:14) 15 $+ %Show_network. [ $+ [ %num ] ] 8(14 $+ %Show_Status. [ $+ [ %num ] ] $+ 8) (14 $+ %show_country. [ $+ [ %num ] ] $+ 8)
if (%Show_Url. [ $+ [ %num ] ] != $Null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Episode URL8:15 %Show_URL. [ $+ [ %num ] ] }
if (%show_Spec_temp. [ $+ [ %num ] ] != $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Episode15 %Show_spec_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_spec_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %Show_spec_Title. [ $+ [ %num ] ] $iif(%Next_Spec_Time. [ $+ [ %num ] ] > $Ctime,14Airing in8:15 $LongTime($Calc(%Next_Spec_Time. [ $+ [ %num ] ] - $Ctime))) }
msg %TVRage_Target. [ $+ [ %num ] ] 14Latest Episode15 %Show_Latest_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_Latest_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %show_latest_Title. [ $+ [ %num ] ]
if (%show_next_temp. [ $+ [ %num ] ] != $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Next Episode15 %Show_next_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_Next_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %Show_Next_Title. [ $+ [ %num ] ] $iif(%Next_Time. [ $+ [ %num ] ] > $Ctime,14Airing in8:15 $LongTime($Calc(%Next_Time. [ $+ [ %num ] ] - $Ctime))) }
}
}
elseif ((%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
notice %TVRage_Target. [ $+ [ %num ] ] 14Schedule for15 $replace($fread(%TVRage_Date. [ $+ [ %num ] ]),$chr(44),8 $+ $chr(44) $+ 15) $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] != $null, 14at15 %TVRage_Time_Schedule. [ $+ [ %num ] ] $+ 8:1500 $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] < 12,14pm,14am))
set %TVRage_Time_Count. [ $+ [ %num ] ] 0
while ($Feof != 1) {
set %TVRage_Tmp. [ $+ [ %num ] ] $Fread(%TVRage_Date. [ $+ [ %num ] ])
set %TVRage_Time_Temp. [ $+ [ %num ] ] $GetTok(%TVRage_Tmp. [ $+ [ %num ] ],1,94)
set %TVRage_Show_NetWork. [ $+ [ %num ] ] $GetTok(%TVRage_Tmp. [ $+ [ %num ] ],2,94)
set %TVRage_Show_Show. [ $+ [ %num ] ] $gettok(%TVRage_Tmp. [ $+ [ %num ] ],3,94)
set %TVRage_Show_Ep. [ $+ [ %num ] ] s $+ $replace($getTok(%TVRage_Tmp. [ $+ [ %num ] ],4,94),x,e)
if (%TVRage_Time_Schedule. [ $+ [ %num ] ] != $Null) {
if ($int($mid(%TVRage_Time_Temp. [ $+ [ %num ] ],1,2)) = $int($mid(%TVRage_Time_Schedule. [ $+ [ %num ] ],1,2))) {
inc %TVRage_Time_Count. [ $+ [ %num ] ] 1
if (%TVRage_Time_Temp2. [ $+ [ %num ] ] = %TVRage_Time_Temp. [ $+ [ %num ] ]) { goto Next_Time }
msg %TVRage_Target. [ $+ [ %num ] ] 14Time8:15 8(15 $+ $Replace(%TVRage_Time_Temp. [ $+ [ %num ] ],:,8:15) $+ 8)
:Next_Time
msg %TVRage_Target. [ $+ [ %num ] ] 14--- 8(15 $+ %TVRage_show_Network. [ $+ [ %num ] ] $+ 8)15 %TVRage_Show_Show. [ $+ [ %num ] ] 8-15 $Replace(%TVRage_Show_Ep. [ $+ [ %num ] ],s,14s15,e,14e15)
Set %TVRage_Time_Temp2. [ $+ [ %num ] ] %TVRage_Time_Temp. [ $+ [ %num ] ]
}
}
if (%TVRage_Time_Schedule. [ $+ [ %num ] ] != $Null) && (%TVRage_Time_Count. [ $+ [ %num ] ] = 0)) { msg %TVRage_Target. [ $+ [ %num ] ] 14There are no new TV Shows Scheduled for15 %TVRage_Time_Schedule. [ $+ [ %num ] ] $+ 8:1500 $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] < 12,14pm,14am) }
elseif (%TVRage_Time_Schedule. [ $+ [ %num ] ] = $Null) {
if (%TVRage_Time_Temp2. [ $+ [ %num ] ] = %TVRage_Time_Temp. [ $+ [ %num ] ]) { goto Next_Time2 }
notice %TVRage_Target. [ $+ [ %num ] ] 14Time8:15 8(15 $+ $Replace(%TVRage_Time_Temp. [ $+ [ %num ] ],:,8:15) $+ 8)
:Next_Time2
notice %TVRage_Target. [ $+ [ %num ] ] 14--- 8(15 $+ %TVRage_show_Network. [ $+ [ %num ] ] $+ 8)15 %TVRage_Show_Show. [ $+ [ %num ] ] 8-15 $replace(%TVRage_Show_Ep. [ $+ [ %num ] ],e,14e15,s,14s15)
Set %TVRage_Time_Temp2. [ $+ [ %num ] ] %TVRage_Time_Temp. [ $+ [ %num ] ]
}
}
}
.fclose %TVRage_Date. [ $+ [ %num ] ]
.remove [ %TVRage_Date. [ $+ [ %num ] ] ] [ $+ [ %num ] ] $+ .txt
}
.unset %tvshow. [ $+ [ %num ] ]
.unset %show_*. [ $+ [ %num ] ]
.unset %TVRage_*. [ $+ [ %num ] ]
.unset %Check_*. [ $+ [ %num ] ]
.unset %next_*. [ $+ [ %num ] ]
}
Alias -l FullDate {
if ($Mid($1,1,3) = Sat) { Return Saturday }
elseif ($Mid($1,1,3) = Sun) { return Sunday }
elseif ($Mid($1,1,3) = Mon) { Return Monday }
elseif ($Mid($1,1,3) = Tue) { Return Tuesday }
elseif ($Mid($1,1,3) = Wed) { Return Wednesday }
elseif ($Mid($1,1,3) = Thu) { Return Thursday }
elseif ($Mid($1,1,3) = Fri) { Return Friday }
else { Return $null }
}
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 }
}
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 -a 4TV Rage 15Settings have been saved8.
}
}
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) {
if ($Did(9) = $null) {
if ($dialog(error,error,-4)) { did -f $Dname 9 }
}
else {
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 -a 14Check you Private Message for the infomation that you requested8.
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 "You must type something to search for!", 5, 20 20 190 17
}
alias -l Check.Settings {
if ($1 = Ep) {
if (%TV_Where = $Null) { Set %TV_Where 0 }
if (%TV_Where = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
elseif (%TV_Where = 0) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
if (%TVRage_Query. [ $+ [ $2 ] ] = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
}
elseif ($1 = Sch) {
if (%TV_Where2 = $Null) { Set %TV_Where2 0 }
if (%TV_Where2 = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
elseif (%TV_Where2 = 0) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
if (%TVRage_Query. [ $+ [ $2 ] ] = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
}
}
alias -l trnum {
set %trnum $base($calc($base(%trnum,36,10) +1),10,36)
return %trnum
}
Alias -l LongTime {
Return 15 $+ $replace($Duration($$1),sec,sc,day,dy,wks,14weeks15,wk,14week15,dys,14days15,dy,14day15,hrs,14hours15,hr,14hour15,min,14minute15,mins,14minutes15,scs,14seconds15,sc,14second15)
}
alias -l SetMonth {
if ($1 = Jan) { return 1 }
elseif ($1 = Feb) { Return 2 }
elseif ($1 = Mar) { Return 3 }
elseif ($1 = Apr) { Return 4 }
elseif ($1 = May) { Return 5 }
elseif ($1 = Jun) { Return 6 }
elseif ($1 = Jul) { Return 7 }
elseif ($1 = Aug) { Return 8 }
elseif ($1 = Sep) { Return 9 }
elseif ($1 = Oct) { Return 10 }
elseif ($1 = Nov) { Return 11 }
elseif ($1 = Dec) { Return 12 }
}
alias -l msg {
if (%TV_Color = 0) { var %Temp = $strip($1-) | tokenize 32 %Temp }
if ($Show) {
if ($1 !ischan) { !.msg $1 $2- }
else { !msg $1 $iif(c isincs $chan($1).mode,$Strip($2-),$2-) }
}
else { !.msg $1 $iif(c isincs $chan($1).mode,$Strip($2-),$2-) }
}
Just so you know the trigger is .tv
Located in the D to the enmark ( aka Denmark ) >< joelp53
And the link posted above gives Me the same error. >< RicJames
So it's only if people are located in the UK ?
Why the sudden discrimination against none UK's ? :P ooO( LoL - You gotta love being H!GH )
-
also on line 186 i get the error, I have gona through all the script i can't seem to see what the problem is
Edit after some help from my friend Camaro we finally got it working it seems for some reason the script had not had the ctrl-k aditions onto the numbers lol, No idea how but heel here it is enjoy, BTW all codos goes to Gecko321 for actually making this script and i beleve it has already been edited on Mirc.net aswell >> http://www.mirc.net/projects.php?go=1204694830
on *:LOAD:dialog -m TVSettings TVSettings -4
on *:UNLOAD:.unset %TV_*
menu Menubar,Channel,Query {
-
TV Rage
.Settings:dialog -m TVSettings TVSettings -4
.Self Search:dialog -m SelfSearch SelfSearch -4
.Status < $+ $iif(%TV_Rage = 1,Enabled,Disabled) $+ >:$iif(%TV_Rage = 0,%TV_Rage = 1,%TV_Rage = 0) | echo -a TV Rage Has Been $iif(%TV_Rage = 1,Enabled.,Disabled.)
-
}
On *:input:#: {
if ($1 != !ep) { return }
if (%TV_Rage = 0) { Halt }
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-
}
On *:Text:!ep*:*: {
if (%TV_Rage = 0) { Halt }
var %Num = $trnum
if ($2 = Schedule) { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where2 = 1,$Nick,$Chan) }
elseif ($Target !ischan) { set %TVRage_Target. [ $+ [ %num ] ] $Nick | set %TVRage_Query. [ $+ [ %num ] ] 1 }
else { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where = 1,$Chan,$Nick) }
set %TVRage_Nick. [ $+ [ %num ] ] $Nick
set %TVRage_Chan. [ $+ [ %num ] ] $Chan
TVRage.Load %num $1-
}
alias -l TVRage.Load {
var %num = $1
if ($Mid($2,4,10) = triggers) {
msg %TVRage_Target. [ $+ [ %num ] ] 14TVRage Commands8:
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!ep 8<15Show8> (15Season and Episode8) 4EX8:15 !ep House 2x05
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!ep Schedule 8<15Day Of Week8> 4EX8:15 !ep Schedule Fri
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!ep Schedule 8<15Day Of Week8> (15Time8) 4EX8:15 !ep Schedule Fri 10
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!ep Schedule 8<15Day Of Week8> (15Time8) (15Country8: 4US8,4GB8,4UK8,4AU8) (15US By Default8) 4EX8:15 !ep Schedule Fri 10 GB
msg %TVRage_Target. [ $+ [ %num ] ] 8- 14Options in 8( ) 14are Optional8. 14Options in 8< > 14are Required8.
.unset %TVRage*
halt
}
tokenize 32 $2-
if ($2 = Schedule) {
var %temp $GetTok($2-,$numtok($2-,32),32)
set %TVRage_Type. [ $+ [ %num ] ] Schedule
if ((%Temp = GB) || (%Temp = UK) || (%Temp = US) || (%Temp = AU)) { set %TVRage_Type. [ $+ [ %num ] ] Country | set %TVRage_Country. [ $+ [ %num ] ] %Temp }
set %TVRage_Time_Schedule. [ $+ [ %num ] ] $iif($4 !isnum,$null,$Int($4))
set %TVRage_Date. [ $+ [ %num ] ] $FullDate($3)
if (%TVRage_Date. [ $+ [ %num ] ] = $null) {
msg %TVRage_Target. [ $+ [ %num ] ] 14You need to pick a 4Day of the Week $+ $iif(!%TVRage_Country. [ $+ [ %num ] ],$chr(32) $+ 14or 4Country) $+ 8.
.unset %TVRage_*. [ $+ [ %num ] ]
.unset %Check_*. [ $+ [ %num ] ]
halt
}
TVRage %Num Schedule
}
else {
$iif($CheckEP(%num,$2-) = 1,set %TVRage_Type. [ $+ [ %num ] ] EpSpec, set %TVRage_Type. [ $+ [ %num ] ] Ep)
TVRage %num $2-
}
}
alias -l TVRage {
if ((%TVRage_Type. [ $+ [ $1 ] ] != Schedule) && (!$2)) {
msg %TVRage_Target. [ $+ [ $1 ] ] 14You actually need to search for a 4TV8-4show 14you know8! 14 Type 4!eptriggers14 for help8.
.unset %TVRage_*. [ $+ [ $1 ] ]
return
}
if (%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 ] ] www.TVRage.com 80
}
on *:sockopen:TVRage.*: {
var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
Check.Settings Sch %Num
if ($sockerr > 0) return
if (%TVRage_Type. [ $+ [ %num ] ] = Schedule) {
msg %TVRage_Target. [ $+ [ %num ] ] 15-- 14Gathering Information 15--
sockwrite -n $SockName GET /quickschedule.php HTTP/1.1
}
elseif (%TVRage_Type. [ $+ [ %num ] ] = Country) {
msg %TVRage_Target. [ $+ [ %num ] ] 15-- 14Gathering Information 15--
sockwrite -n $SockName GET /quickschedule.php?country= $+ %TVRage_Country. [ $+ [ %num ] ] HTTP/1.1
}
elseif ((%TVRage_Type. [ $+ [ %num ] ] = Ep) || (%TVRage_Type. [ $+ [ %num ] ] = EpSpec)) { sockwrite -n $sockname GET /quickinfo.php?show= $+ %tvshow. [ $+ [ %num ] ] HTTP/1.0 }
sockwrite -n $SockName host: $+(www.TVRage.com,$crlf,$crlf)
set %TVRage_Day. [ $+ [ %num ] ] 0
sockwrite -n $sockname Host: 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 %tvdata
sockread %tvdata
if ($mid(%Tvdata,1,5) = [DAY]) {
if ($Fopen(%TVRage_Day. [ $+ [ %num ] ])) {
.fclose %TVRage_Day. [ $+ [ %num ] ]
}
set %TVRage_Day. [ $+ [ %num ] ] $GetTok($Mid(%Tvdata,6,$Calc($pos(%Tvdata,[/,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(%Tvdata,6,$Calc($pos(%Tvdata,[/,1) - 6))
}
}
if ($mid(%TvData,1,6) = [TIME]) {
if (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) {
set %TVRage_Time. [ $+ [ %num ] ] $Mid(%Tvdata,7,$Calc($pos(%tvdata,[/,1) - 7))
}
}
if ($Mid(%TVData,1,6) = [SHOW]) {
if (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) {
set %TVRage_Show_Temp. [ $+ [ %num ] ] $Mid(%TvData,7,$Calc($pos(%Tvdata,^,3) - 7))
.fwrite -n %TVRage_Day. [ $+ [ %num ] ] %TVRage_Time. [ $+ [ %num ] ] $+ ^ $+ %TVRage_Show_Temp. [ $+ [ %num ] ]
}
}
if (!$sockbr) return
if (show name isin %tvdata) { set %show_name. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (country isin %tvdata) { set %show_country. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (Latest Episode isin %tvdata) {
set %show_latest_temp. [ $+ [ %num ] ] $gettok(%tvdata,2,64)
set %show_latest_Ep. [ $+ [ %num ] ] $gettok(%show_latest_Temp. [ $+ [ %num ] ],1,94)
set %show_latest_Title. [ $+ [ %num ] ] $gettok(%show_latest_temp. [ $+ [ %num ] ],2,94)
set %show_latest_airdate. [ $+ [ %num ] ] $gettok(%Show_latest_Temp. [ $+ [ %num ] ],3,94)
}
if (Next Episode isin %tvdata) {
set %show_next_temp. [ $+ [ %num ] ] $gettok(%tvdata,2,64)
set %show_next_Ep. [ $+ [ %num ] ] $gettok(%show_next_Temp. [ $+ [ %num ] ],1,94)
set %show_next_Title. [ $+ [ %num ] ] $gettok(%show_next_temp. [ $+ [ %num ] ],2,94)
set %show_next_airdate. [ $+ [ %num ] ] $gettok(%Show_Next_Temp. [ $+ [ %num ] ],3,94)
}
if (Episode URL isin %tvdata) { set %Show_URL. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (Episode Info isin %tvdata) {
set %Show_Spec_Temp. [ $+ [ %num ] ] $Gettok(%tvdata,2,64)
set %show_Spec_Ep. [ $+ [ %num ] ] $gettok(%show_spec_Temp. [ $+ [ %num ] ],1,94)
set %show_Spec_Title. [ $+ [ %num ] ] $gettok(%show_spec_temp. [ $+ [ %num ] ],2,94)
set %show_Spec_airdate. [ $+ [ %num ] ] $gettok(%Show_spec_Temp. [ $+ [ %num ] ],3,94)
if (%show_Spec_airdate. [ $+ [ %num ] ] = 00//00) { set %show_Spec_airdate. [ $+ [ %num ] ] }
}
if (Status isin %Tvdata) { set %Show_Status. [ $+ [ %num ] ] $Gettok(%Tvdata,2,64) }
if (airtime isin %Tvdata) { Set %Show_Airtime. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (network isin %Tvdata) { set %Show_network. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (%show_Next_airdate. [ $+ [ %num ] ]) {
set %Next_Temp. [ $+ [ %num ] ] $puttok(%Show_Next_Airdate. [ $+ [ %num ] ],$GetTok(%Show_Next_airdate. [ $+ [ %num ] ],2,47),1,47)
set %Next_Temp. [ $+ [ %num ] ] $puttok(%Next_Temp. [ $+ [ %num ] ],$SetMonth($GetTok(%Show_Next_Airdate. [ $+ [ %num ] ] ,1,47)),2,47)
set %Next_Time. [ $+ [ %num ] ] $CTime(%Next_Temp. [ $+ [ %num ] ] $GetTok(%Show_Airtime. [ $+ [ %num ] ] ,3-4,32))
}
if (%Show_Spec_airdate. [ $+ [ %num ] ]) {
set %Next_Spec_Temp. [ $+ [ %num ] ] $puttok(%Show_Spec_Airdate. [ $+ [ %num ] ],$SetMonth($GetTok(%Show_Spec_Airdate. [ $+ [ %num ] ],2,47)),2,47)
set %Next_Spec_Time. [ $+ [ %num ] ] $CTime(%Next_Spec_Temp. [ $+ [ %num ] ] $GetTok(%Show_Airtime. [ $+ [ %num ] ] ,3-4,32))
}
}
on *:sockclose:TVRage.*:{
var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
if ((%TVRage_Type. [ $+ [ %num ] ] = Ep) || (%TVRage_Type. [ $+ [ %num ] ] = EpSpec)) {
Check.Settings Ep %Num
set %Show_Ep. [ $+ [ %num ] ] s $+ $replace(%Show_ep. [ $+ [ %num ] ],x,e)
if (%show_name. [ $+ [ %num ] ] = $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14No Such Show8, 14Check your spelling and try again8. }
else {
msg %TVRage_Target. [ $+ [ %num ] ] 14 $+ %show_name. [ $+ [ %num ] ] 15--14 $Replace(%Show_Airtime. [ $+ [ %num ] ],$Chr(44),8 $+ $chr(44) $+ 14,:,8:14) 15 $+ %Show_network. [ $+ [ %num ] ] 8(14 $+ %Show_Status. [ $+ [ %num ] ] $+ 8) (14 $+ %show_country. [ $+ [ %num ] ] $+ 8)
if (%Show_Url. [ $+ [ %num ] ] != $Null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Episode URL8:15 %Show_URL. [ $+ [ %num ] ] }
if (%show_Spec_temp. [ $+ [ %num ] ] != $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Episode15 %Show_spec_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_spec_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %Show_spec_Title. [ $+ [ %num ] ] $iif(%Next_Spec_Time. [ $+ [ %num ] ] > $Ctime,14Airing in8:15 $LongTime($Calc(%Next_Spec_Time. [ $+ [ %num ] ] - $Ctime))) }
msg %TVRage_Target. [ $+ [ %num ] ] 14Latest Episode15 %Show_Latest_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_Latest_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %show_latest_Title. [ $+ [ %num ] ]
if (%show_next_temp. [ $+ [ %num ] ] != $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Next Episode15 %Show_next_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_Next_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %Show_Next_Title. [ $+ [ %num ] ] $iif(%Next_Time. [ $+ [ %num ] ] > $Ctime,14Airing in8:15 $LongTime($Calc(%Next_Time. [ $+ [ %num ] ] - $Ctime))) }
}
}
elseif ((%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
msg %TVRage_Target. [ $+ [ %num ] ] 14Schedule for15 $replace($fread(%TVRage_Date. [ $+ [ %num ] ]),$chr(44),8 $+ $chr(44) $+ 15) $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] != $null, 14at15 %TVRage_Time_Schedule. [ $+ [ %num ] ] $+ 8:1500 $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] < 12,14pm,14am))
set %TVRage_Time_Count. [ $+ [ %num ] ] 0
while ($Feof != 1) {
set %TVRage_Tmp. [ $+ [ %num ] ] $Fread(%TVRage_Date. [ $+ [ %num ] ])
set %TVRage_Time_Temp. [ $+ [ %num ] ] $GetTok(%TVRage_Tmp. [ $+ [ %num ] ],1,94)
set %TVRage_Show_NetWork. [ $+ [ %num ] ] $GetTok(%TVRage_Tmp. [ $+ [ %num ] ],2,94)
set %TVRage_Show_Show. [ $+ [ %num ] ] $gettok(%TVRage_Tmp. [ $+ [ %num ] ],3,94)
set %TVRage_Show_Ep. [ $+ [ %num ] ] s $+ $replace($getTok(%TVRage_Tmp. [ $+ [ %num ] ],4,94),x,e)
if (%TVRage_Time_Schedule. [ $+ [ %num ] ] != $Null) {
if ($int($mid(%TVRage_Time_Temp. [ $+ [ %num ] ],1,2)) = $int($mid(%TVRage_Time_Schedule. [ $+ [ %num ] ],1,2))) {
inc %TVRage_Time_Count. [ $+ [ %num ] ] 1
if (%TVRage_Time_Temp2. [ $+ [ %num ] ] = %TVRage_Time_Temp. [ $+ [ %num ] ]) { goto Next_Time }
msg %TVRage_Target. [ $+ [ %num ] ] 14Time8:15 8(15 $+ $Replace(%TVRage_Time_Temp. [ $+ [ %num ] ],:,8:15) $+ 8)
:Next_Time
msg %TVRage_Target. [ $+ [ %num ] ] 14--- 8(15 $+ %TVRage_show_Network. [ $+ [ %num ] ] $+ 8)15 %TVRage_Show_Show. [ $+ [ %num ] ] 8-15 $Replace(%TVRage_Show_Ep. [ $+ [ %num ] ],s,14s15,e,14e15)
Set %TVRage_Time_Temp2. [ $+ [ %num ] ] %TVRage_Time_Temp. [ $+ [ %num ] ]
}
}
if (%TVRage_Time_Schedule. [ $+ [ %num ] ] != $Null) && (%TVRage_Time_Count. [ $+ [ %num ] ] = 0)) { msg %TVRage_Target. [ $+ [ %num ] ] 14There are no new TV Shows Scheduled for15 %TVRage_Time_Schedule. [ $+ [ %num ] ] $+ 8:1500 $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] < 12,14pm,14am) }
elseif (%TVRage_Time_Schedule. [ $+ [ %num ] ] = $Null) {
if (%TVRage_Time_Temp2. [ $+ [ %num ] ] = %TVRage_Time_Temp. [ $+ [ %num ] ]) { goto Next_Time2 }
msg %TVRage_Target. [ $+ [ %num ] ] 14Time8:15 8(15 $+ $Replace(%TVRage_Time_Temp. [ $+ [ %num ] ],:,8:15) $+ 8)
:Next_Time2
msg %TVRage_Target. [ $+ [ %num ] ] 14--- 8(15 $+ %TVRage_show_Network. [ $+ [ %num ] ] $+ 8)15 %TVRage_Show_Show. [ $+ [ %num ] ] 8-15 $replace(%TVRage_Show_Ep. [ $+ [ %num ] ],e,14e15,s,14s15)
Set %TVRage_Time_Temp2. [ $+ [ %num ] ] %TVRage_Time_Temp. [ $+ [ %num ] ]
}
}
}
.fclose %TVRage_Date. [ $+ [ %num ] ]
.remove [ %TVRage_Date. [ $+ [ %num ] ] ] [ $+ [ %num ] ] $+ .txt
}
.unset %tvshow. [ $+ [ %num ] ]
.unset %show_*. [ $+ [ %num ] ]
.unset %TVRage_*. [ $+ [ %num ] ]
.unset %Check_*. [ $+ [ %num ] ]
.unset %next_*. [ $+ [ %num ] ]
}
Alias -l FullDate {
if ($Mid($1,1,3) = Sat) { Return Saturday }
elseif ($Mid($1,1,3) = Sun) { return Sunday }
elseif ($Mid($1,1,3) = Mon) { Return Monday }
elseif ($Mid($1,1,3) = Tue) { Return Tuesday }
elseif ($Mid($1,1,3) = Wed) { Return Wednesday }
elseif ($Mid($1,1,3) = Thu) { Return Thursday }
elseif ($Mid($1,1,3) = Fri) { Return Friday }
else { Return $null }
}
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 }
}
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 -a 4TV Rage 15Settings have been saved8.
}
}
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) {
if ($Did(9) = $null) {
if ($dialog(error,error,-4)) { did -f $Dname 9 }
}
else {
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 -a 14Check you Private Message for the infomation that you requested8.
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 "You must type something to search for!", 5, 20 20 190 17
}
alias -l Check.Settings {
if ($1 = Ep) {
if (%TV_Where = $Null) { Set %TV_Where 0 }
if (%TV_Where = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
elseif (%TV_Where = 0) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
if (%TVRage_Query. [ $+ [ $2 ] ] = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
}
elseif ($1 = Sch) {
if (%TV_Where2 = $Null) { Set %TV_Where2 0 }
if (%TV_Where2 = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
elseif (%TV_Where2 = 0) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
if (%TVRage_Query. [ $+ [ $2 ] ] = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
}
}
alias -l trnum {
set %trnum $base($calc($base(%trnum,36,10) +1),10,36)
return %trnum
}
Alias -l LongTime {
Return 15 $+ $replace($Duration($$1),sec,sc,day,dy,wks,14weeks15,wk,14week15,dys,14days15,dy,14day15,hrs,14hours15,hr,14hour15,min,14minute15,mins,14minutes15,scs,14seconds15,sc,14second15)
}
alias -l SetMonth {
if ($1 = Jan) { return 1 }
elseif ($1 = Feb) { Return 2 }
elseif ($1 = Mar) { Return 3 }
elseif ($1 = Apr) { Return 4 }
elseif ($1 = May) { Return 5 }
elseif ($1 = Jun) { Return 6 }
elseif ($1 = Jul) { Return 7 }
elseif ($1 = Aug) { Return 8 }
elseif ($1 = Sep) { Return 9 }
elseif ($1 = Oct) { Return 10 }
elseif ($1 = Nov) { Return 11 }
elseif ($1 = Dec) { Return 12 }
}
alias -l msg {
if (%TV_Color = 0) { var %Temp = $strip($1-) | tokenize 32 %Temp }
if ($Show) {
if ($1 !ischan) { !.msg $1 $2- }
else { !msg $1 $iif(c isincs $chan($1).mode,$Strip($2-),$2-) }
}
else { !.msg $1 $iif(c isincs $chan($1).mode,$Strip($2-),$2-) }
}
To fix it goto:
sockopen TVRage. [ $+ [ $1 ] ] www.TVRage.com 80
and change 80 to 8080
sockopen TVRage. [ $+ [ $1 ] ] www.TVRage.com 8080
For the NUBs? working script below:
EDIT: REMOVED ! ! ! ! ! ! !
ALL CREDITS GOTO: Valis ( for the "fix" )
AND ALL CREDITS GOTO: Gecko321 ( for the script )
EDIT:
Yes I forgot to make it 8080...
And the only thing I can say is that it works here RickJames...
Only thing I did was chacnge the port for 80 to 8080
and now it works...
sockwrite -n $SockName GET /quickschedule.php HTTP/1.1
Change that to:
sockwrite -n $SockName GET tools/quickschedule.php HTTP/1.1
and this
sockwrite -n $SockName GET /quickschedule.php?country= $+ %TVRage_Country. [ $+ [ %num ] ] HTTP/1.1
to
sockwrite -n $SockName GET tools/quickschedule.php?country= $+ %TVRage_Country. [ $+ [ %num ] ] HTTP/1.1
A friend of mine helped me add this line
if (%Show_Url.[ $+ [ %num ] ] != $Null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Show URL8:15 %Show_URL. [ $+ [ %num ] ] }
To the script so that it shows the show url on !ep show but ever since tvrage changed what they changed this has stopped working.
I've tried looking at the changes that have happened and changing mine accordingly to try and get it to work but since I know pretty much nothing about regex I have failed miserably. If anyone knows how to fix this and would be willing to show me I would really appreciate it.
Thanks in advance.
on *:LOAD:dialog -m TVSettings TVSettings -4
on *:UNLOAD:.unset %TV_*
menu Menubar,Channel,Query {
-
TV Rage
.Settings:dialog -m TVSettings TVSettings -4
.Self Search:dialog -m SelfSearch SelfSearch -4
.Status < $+ $iif(%TV_Rage = 1,Enabled,Disabled) $+ >:$iif(%TV_Rage = 0,%TV_Rage = 1,%TV_Rage = 0) | echo -a TV Rage Has Been $iif(%TV_Rage = 1,Enabled.,Disabled.)
-
}
On *:input:#: {
if ($1 != !ep) { return }
if (%TV_Rage = 0) { Halt }
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-
}
On *:Text:!ep*:*: {
if (%TV_Rage = 0) { Halt }
var %Num = $trnum
if ($2 = Schedule) { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where2 = 1,$Nick,$Chan) }
elseif ($Target !ischan) { set %TVRage_Target. [ $+ [ %num ] ] $Nick | set %TVRage_Query. [ $+ [ %num ] ] 1 }
else { set %TVRage_Target. [ $+ [ %num ] ] $iif(%TV_Where = 1,$Chan,$Nick) }
set %TVRage_Nick. [ $+ [ %num ] ] $Nick
set %TVRage_Chan. [ $+ [ %num ] ] $Chan
TVRage.Load %num $1-
}
alias -l TVRage.Load {
var %num = $1
if ($Mid($2,4,10) = triggers) {
msg %TVRage_Target. [ $+ [ %num ] ] 14TVRage Commands8:
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!ep 8<15Show8> (15Season and Episode8) 4EX8:15 !ep House 2x05
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!ep Schedule 8<15Day Of Week8> 4EX8:15 !ep Schedule Fri
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!ep Schedule 8<15Day Of Week8> (15Time8) 4EX8:15 !ep Schedule Fri 10
msg %TVRage_Target. [ $+ [ %num ] ] 8- 15!ep Schedule 8<15Day Of Week8> (15Time8) (15Country8: 4US8,4GB8,4UK8,4AU8) (15US By Default8) 4EX8:15 !ep Schedule Fri 10 GB
msg %TVRage_Target. [ $+ [ %num ] ] 8- 14Options in 8( ) 14are Optional8. 14Options in 8< > 14are Required8.
.unset %TVRage*
halt
}
tokenize 32 $2-
if ($2 = Schedule) {
var %temp $GetTok($2-,$numtok($2-,32),32)
set %TVRage_Type. [ $+ [ %num ] ] Schedule
if ((%Temp = GB) || (%Temp = UK) || (%Temp = US) || (%Temp = AU)) { set %TVRage_Type. [ $+ [ %num ] ] Country | set %TVRage_Country. [ $+ [ %num ] ] %Temp }
set %TVRage_Time_Schedule. [ $+ [ %num ] ] $iif($4 !isnum,$null,$Int($4))
set %TVRage_Date. [ $+ [ %num ] ] $FullDate($3)
if (%TVRage_Date. [ $+ [ %num ] ] = $null) {
msg %TVRage_Target. [ $+ [ %num ] ] 14You need to pick a 4Day of the Week $+ $iif(!%TVRage_Country. [ $+ [ %num ] ],$chr(32) $+ 14or 4Country) $+ 8.
.unset %TVRage_*. [ $+ [ %num ] ]
.unset %Check_*. [ $+ [ %num ] ]
halt
}
TVRage %Num Schedule
}
else {
$iif($CheckEP(%num,$2-) = 1,set %TVRage_Type. [ $+ [ %num ] ] EpSpec, set %TVRage_Type. [ $+ [ %num ] ] Ep)
TVRage %num $2-
}
}
alias -l TVRage {
if ((%TVRage_Type. [ $+ [ $1 ] ] != Schedule) && (!$2)) {
msg %TVRage_Target. [ $+ [ $1 ] ] 14You actually need to search for a 4TV8-4show 14you know8! 14 Type 4!eptriggers14 for help8.
.unset %TVRage_*. [ $+ [ $1 ] ]
return
}
if (%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 ] ] www.TVRage.com 80
}
on *:sockopen:TVRage.*: {
var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
Check.Settings Sch %Num
if ($sockerr > 0) return
if (%TVRage_Type. [ $+ [ %num ] ] = Schedule) {
msg %TVRage_Target. [ $+ [ %num ] ] 15-- 14Gathering Information 15--
sockwrite -n $SockName GET /quickschedule.php HTTP/1.1
}
elseif (%TVRage_Type. [ $+ [ %num ] ] = Country) {
msg %TVRage_Target. [ $+ [ %num ] ] 15-- 14Gathering Information 15--
sockwrite -n $SockName GET /quickschedule.php?country= $+ %TVRage_Country. [ $+ [ %num ] ] HTTP/1.1
}
elseif ((%TVRage_Type. [ $+ [ %num ] ] = Ep) || (%TVRage_Type. [ $+ [ %num ] ] = EpSpec)) { sockwrite -n $sockname GET http://services.tvrage.com/tools/quickinfo.php?show= $+ %tvshow. [ $+ [ %num ] ] HTTP/1.0 }
sockwrite -n $SockName host: $+(www.TVRage.com,$crlf,$crlf)
set %TVRage_Day. [ $+ [ %num ] ] 0
sockwrite -n $sockname Host: 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 %tvdata
sockread %tvdata
if ($mid(%Tvdata,1,5) = [DAY]) {
if ($Fopen(%TVRage_Day. [ $+ [ %num ] ])) {
.fclose %TVRage_Day. [ $+ [ %num ] ]
}
set %TVRage_Day. [ $+ [ %num ] ] $GetTok($Mid(%Tvdata,6,$Calc($pos(%Tvdata,[/,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(%Tvdata,6,$Calc($pos(%Tvdata,[/,1) - 6))
}
}
if ($mid(%TvData,1,6) = [TIME]) {
if (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) {
set %TVRage_Time. [ $+ [ %num ] ] $Mid(%Tvdata,7,$Calc($pos(%tvdata,[/,1) - 7))
}
}
if ($Mid(%TVData,1,6) = [SHOW]) {
if (%TVRage_Day. [ $+ [ %num ] ] = %TVRage_Date. [ $+ [ %num ] ]) {
set %TVRage_Show_Temp. [ $+ [ %num ] ] $Mid(%TvData,7,$Calc($pos(%Tvdata,^,3) - 7))
.fwrite -n %TVRage_Day. [ $+ [ %num ] ] %TVRage_Time. [ $+ [ %num ] ] $+ ^ $+ %TVRage_Show_Temp. [ $+ [ %num ] ]
}
}
if (!$sockbr) return
if (show name isin %tvdata) { set %show_name. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (country isin %tvdata) { set %show_country. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (Latest Episode isin %tvdata) {
set %show_latest_temp. [ $+ [ %num ] ] $gettok(%tvdata,2,64)
set %show_latest_Ep. [ $+ [ %num ] ] $gettok(%show_latest_Temp. [ $+ [ %num ] ],1,94)
set %show_latest_Title. [ $+ [ %num ] ] $gettok(%show_latest_temp. [ $+ [ %num ] ],2,94)
set %show_latest_airdate. [ $+ [ %num ] ] $gettok(%Show_latest_Temp. [ $+ [ %num ] ],3,94)
}
if (Next Episode isin %tvdata) {
set %show_next_temp. [ $+ [ %num ] ] $gettok(%tvdata,2,64)
set %show_next_Ep. [ $+ [ %num ] ] $gettok(%show_next_Temp. [ $+ [ %num ] ],1,94)
set %show_next_Title. [ $+ [ %num ] ] $gettok(%show_next_temp. [ $+ [ %num ] ],2,94)
set %show_next_airdate. [ $+ [ %num ] ] $gettok(%Show_Next_Temp. [ $+ [ %num ] ],3,94)
}
if (Episode URL isin %tvdata) { set %Show_URL. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (Episode Info isin %tvdata) {
set %Show_Spec_Temp. [ $+ [ %num ] ] $Gettok(%tvdata,2,64)
set %show_Spec_Ep. [ $+ [ %num ] ] $gettok(%show_spec_Temp. [ $+ [ %num ] ],1,94)
set %show_Spec_Title. [ $+ [ %num ] ] $gettok(%show_spec_temp. [ $+ [ %num ] ],2,94)
set %show_Spec_airdate. [ $+ [ %num ] ] $gettok(%Show_spec_Temp. [ $+ [ %num ] ],3,94)
if (%show_Spec_airdate. [ $+ [ %num ] ] = 00//00) { set %show_Spec_airdate. [ $+ [ %num ] ] }
}
if (Status isin %Tvdata) { set %Show_Status. [ $+ [ %num ] ] $Gettok(%Tvdata,2,64) }
if (airtime isin %Tvdata) { Set %Show_Airtime. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (network isin %Tvdata) { set %Show_network. [ $+ [ %num ] ] $gettok(%tvdata,2,64) }
if (%show_Next_airdate. [ $+ [ %num ] ]) {
set %Next_Temp. [ $+ [ %num ] ] $puttok(%Show_Next_Airdate. [ $+ [ %num ] ],$GetTok(%Show_Next_airdate. [ $+ [ %num ] ],2,47),1,47)
set %Next_Temp. [ $+ [ %num ] ] $puttok(%Next_Temp. [ $+ [ %num ] ],$SetMonth($GetTok(%Show_Next_Airdate. [ $+ [ %num ] ] ,1,47)),2,47)
set %Next_Time. [ $+ [ %num ] ] $CTime(%Next_Temp. [ $+ [ %num ] ] $GetTok(%Show_Airtime. [ $+ [ %num ] ] ,3-4,32))
}
if (%Show_Spec_airdate. [ $+ [ %num ] ]) {
set %Next_Spec_Temp. [ $+ [ %num ] ] $puttok(%Show_Spec_Airdate. [ $+ [ %num ] ],$SetMonth($GetTok(%Show_Spec_Airdate. [ $+ [ %num ] ],2,47)),2,47)
set %Next_Spec_Time. [ $+ [ %num ] ] $CTime(%Next_Spec_Temp. [ $+ [ %num ] ] $GetTok(%Show_Airtime. [ $+ [ %num ] ] ,3-4,32))
}
}
on *:sockclose:TVRage.*:{
var %num = $Mid($sockname,$calc($Pos($sockName,.,1) + 1))
if ((%TVRage_Type. [ $+ [ %num ] ] = Ep) || (%TVRage_Type. [ $+ [ %num ] ] = EpSpec)) {
Check.Settings Ep %Num
set %Show_Ep. [ $+ [ %num ] ] s $+ $replace(%Show_ep. [ $+ [ %num ] ],x,e)
if (%show_name. [ $+ [ %num ] ] = $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14No Such Show8, 14Check your spelling and try again8. }
else {
msg %TVRage_Target. [ $+ [ %num ] ] 14 $+ %show_name. [ $+ [ %num ] ] 15--14 $Replace(%Show_Airtime. [ $+ [ %num ] ],$Chr(44),8 $+ $chr(44) $+ 14,:,8:14) 15 $+ %Show_network. [ $+ [ %num ] ] 8(14 $+ %Show_Status. [ $+ [ %num ] ] $+ 8) (14 $+ %show_country. [ $+ [ %num ] ] $+ 8)
if (%Show_Url. [ $+ [ %num ] ] != $Null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Episode URL8:15 %Show_URL. [ $+ [ %num ] ] }
if (%show_Spec_temp. [ $+ [ %num ] ] != $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Episode15 %Show_spec_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_spec_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %Show_spec_Title. [ $+ [ %num ] ] $iif(%Next_Spec_Time. [ $+ [ %num ] ] > $Ctime,14Airing in8:15 $LongTime($Calc(%Next_Spec_Time. [ $+ [ %num ] ] - $Ctime))) }
msg %TVRage_Target. [ $+ [ %num ] ] 14Latest Episode15 %Show_Latest_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_Latest_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %show_latest_Title. [ $+ [ %num ] ]
if (%show_next_temp. [ $+ [ %num ] ] != $null) { msg %TVRage_Target. [ $+ [ %num ] ] 14Next Episode15 %Show_next_airdate. [ $+ [ %num ] ] 14 $+ $Replace(%Show_Next_Ep. [ $+ [ %num ] ],x,8x14) 15 $+ %Show_Next_Title. [ $+ [ %num ] ] $iif(%Next_Time. [ $+ [ %num ] ] > $Ctime,14Airing in8:15 $LongTime($Calc(%Next_Time. [ $+ [ %num ] ] - $Ctime))) }
}
}
elseif ((%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
msg %TVRage_Target. [ $+ [ %num ] ] 14Schedule for15 $replace($fread(%TVRage_Date. [ $+ [ %num ] ]),$chr(44),8 $+ $chr(44) $+ 15) $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] != $null, 14at15 %TVRage_Time_Schedule. [ $+ [ %num ] ] $+ 8:1500 $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] < 12,14pm,14am))
set %TVRage_Time_Count. [ $+ [ %num ] ] 0
while ($Feof != 1) {
set %TVRage_Tmp. [ $+ [ %num ] ] $Fread(%TVRage_Date. [ $+ [ %num ] ])
set %TVRage_Time_Temp. [ $+ [ %num ] ] $GetTok(%TVRage_Tmp. [ $+ [ %num ] ],1,94)
set %TVRage_Show_NetWork. [ $+ [ %num ] ] $GetTok(%TVRage_Tmp. [ $+ [ %num ] ],2,94)
set %TVRage_Show_Show. [ $+ [ %num ] ] $gettok(%TVRage_Tmp. [ $+ [ %num ] ],3,94)
set %TVRage_Show_Ep. [ $+ [ %num ] ] s $+ $replace($getTok(%TVRage_Tmp. [ $+ [ %num ] ],4,94),x,e)
if (%TVRage_Time_Schedule. [ $+ [ %num ] ] != $Null) {
if ($int($mid(%TVRage_Time_Temp. [ $+ [ %num ] ],1,2)) = $int($mid(%TVRage_Time_Schedule. [ $+ [ %num ] ],1,2))) {
inc %TVRage_Time_Count. [ $+ [ %num ] ] 1
if (%TVRage_Time_Temp2. [ $+ [ %num ] ] = %TVRage_Time_Temp. [ $+ [ %num ] ]) { goto Next_Time }
msg %TVRage_Target. [ $+ [ %num ] ] 14Time8:15 8(15 $+ $Replace(%TVRage_Time_Temp. [ $+ [ %num ] ],:,8:15) $+ 8)
:Next_Time
msg %TVRage_Target. [ $+ [ %num ] ] 14--- 8(15 $+ %TVRage_show_Network. [ $+ [ %num ] ] $+ 8)15 %TVRage_Show_Show. [ $+ [ %num ] ] 8-15 $Replace(%TVRage_Show_Ep. [ $+ [ %num ] ],s,14s15,e,14e15)
Set %TVRage_Time_Temp2. [ $+ [ %num ] ] %TVRage_Time_Temp. [ $+ [ %num ] ]
}
}
if (%TVRage_Time_Schedule. [ $+ [ %num ] ] != $Null) && (%TVRage_Time_Count. [ $+ [ %num ] ] = 0)) { msg %TVRage_Target. [ $+ [ %num ] ] 14There are no new TV Shows Scheduled for15 %TVRage_Time_Schedule. [ $+ [ %num ] ] $+ 8:1500 $iif(%TVRage_Time_Schedule. [ $+ [ %num ] ] < 12,14pm,14am) }
elseif (%TVRage_Time_Schedule. [ $+ [ %num ] ] = $Null) {
if (%TVRage_Time_Temp2. [ $+ [ %num ] ] = %TVRage_Time_Temp. [ $+ [ %num ] ]) { goto Next_Time2 }
msg %TVRage_Target. [ $+ [ %num ] ] 14Time8:15 8(15 $+ $Replace(%TVRage_Time_Temp. [ $+ [ %num ] ],:,8:15) $+ 8)
:Next_Time2
msg %TVRage_Target. [ $+ [ %num ] ] 14--- 8(15 $+ %TVRage_show_Network. [ $+ [ %num ] ] $+ 8)15 %TVRage_Show_Show. [ $+ [ %num ] ] 8-15 $replace(%TVRage_Show_Ep. [ $+ [ %num ] ],e,14e15,s,14s15)
Set %TVRage_Time_Temp2. [ $+ [ %num ] ] %TVRage_Time_Temp. [ $+ [ %num ] ]
}
}
}
.fclose %TVRage_Date. [ $+ [ %num ] ]
.remove [ %TVRage_Date. [ $+ [ %num ] ] ] [ $+ [ %num ] ] $+ .txt
}
.unset %tvshow. [ $+ [ %num ] ]
.unset %show_*. [ $+ [ %num ] ]
.unset %TVRage_*. [ $+ [ %num ] ]
.unset %Check_*. [ $+ [ %num ] ]
.unset %next_*. [ $+ [ %num ] ]
}
Alias -l FullDate {
if ($Mid($1,1,3) = Sat) { Return Saturday }
elseif ($Mid($1,1,3) = Sun) { return Sunday }
elseif ($Mid($1,1,3) = Mon) { Return Monday }
elseif ($Mid($1,1,3) = Tue) { Return Tuesday }
elseif ($Mid($1,1,3) = Wed) { Return Wednesday }
elseif ($Mid($1,1,3) = Thu) { Return Thursday }
elseif ($Mid($1,1,3) = Fri) { Return Friday }
else { Return $null }
}
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 }
}
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 -a 4TV Rage 15Settings have been saved8.
}
}
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) {
if ($Did(9) = $null) {
if ($dialog(error,error,-4)) { did -f $Dname 9 }
}
else {
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 -a 14Check you Private Message for the infomation that you requested8.
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 "You must type something to search for!", 5, 20 20 190 17
}
alias -l Check.Settings {
if ($1 = Ep) {
if (%TV_Where = $Null) { Set %TV_Where 0 }
if (%TV_Where = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
elseif (%TV_Where = 0) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
if (%TVRage_Query. [ $+ [ $2 ] ] = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
}
elseif ($1 = Sch) {
if (%TV_Where2 = $Null) { Set %TV_Where2 0 }
if (%TV_Where2 = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Chan. [ $+ [ $2 ] ] }
elseif (%TV_Where2 = 0) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
if (%TVRage_Query. [ $+ [ $2 ] ] = 1) { set %TVRage_Target. [ $+ [ $2 ] ] %TVRage_Nick. [ $+ [ $2 ] ] }
}
}
alias -l trnum {
set %trnum $base($calc($base(%trnum,36,10) +1),10,36)
return %trnum
}
Alias -l LongTime {
Return 15 $+ $replace($Duration($$1),sec,sc,day,dy,wks,14weeks15,wk,14week15,dys,14days15,dy,14day15,hrs,14hours15,hr,14hour15,min,14minute15,mins,14minutes15,scs,14seconds15,sc,14second15)
}
alias -l SetMonth {
if ($1 = Jan) { return 1 }
elseif ($1 = Feb) { Return 2 }
elseif ($1 = Mar) { Return 3 }
elseif ($1 = Apr) { Return 4 }
elseif ($1 = May) { Return 5 }
elseif ($1 = Jun) { Return 6 }
elseif ($1 = Jul) { Return 7 }
elseif ($1 = Aug) { Return 8 }
elseif ($1 = Sep) { Return 9 }
elseif ($1 = Oct) { Return 10 }
elseif ($1 = Nov) { Return 11 }
elseif ($1 = Dec) { Return 12 }
}
alias -l msg {
if (%TV_Color = 0) { var %Temp = $strip($1-) | tokenize 32 %Temp }
if ($Show) {
if ($1 !ischan) { !.msg $1 $2- }
else { !msg $1 $iif(c isincs $chan($1).mode,$Strip($2-),$2-) }
}
else { !.msg $1 $iif(c isincs $chan($1).mode,$Strip($2-),$2-) }
}
use this it works