TVRage

By Ayon on Mar 27, 2010

Easily explained. Place this in the remote (Alt+R) of your bot..

Then all you type is !tvrage [--info=*]

Update:
I rewrote the whole thing. Hopefully it will be more usefull now :) Hopefully this will bemore handy

Example:
00:52:53 ‹@Ayon› !tvrage big bang theory
00:52:54 ‹Stillborn› Show: The Big Bang Theory Network: CBS
00:52:55 ‹Stillborn› Last Episode: (S:03/E:18) The Pants Alternative (Mar 22nd 2010)
00:52:55 ‹Stillborn› Next Episode: (S:03/E:19) The Wheaton Recurrence (Apr 12th 2010) @ 09:30pm
00:52:55 ‹Stillborn› Status: Returning Series URL: http://www.tvrage.com/The_Big_Bang_Theory

00:53:00 ‹@Ayon› !tvrage air wolf
00:53:01 ‹Stillborn› Show: Airwolf Network: USA
00:53:02 ‹Stillborn› Last Episode: (S:04/E:24) Welcome to Paradise (Aug 07th 1987)
00:53:02 ‹Stillborn› Status: Canceled/Ended URL: http://www.tvrage.com/Airwolf

/*
+--------------------------------------------------------------
| TV Rage v1.0 - by FamilyGuy
+--------------------------------------------------------------
| This is a script written for the IRC client mIRC, and is
| primarily ment for using on a mIRC based bot.
+--------------------------------------------------------------
*/
#tvrage on
on 1:TEXT:!tvrage *:#:{
  if (%aflood. [ $+ [ $nick ] ]) { halt }
  set -u5 %aflood. [ $+ [ $nick ] ] 1
  if (!$2) { .msg # Syntax: .tvrage [--info[=item]] <show> | return }
  tvrage # $iif(*-info=* iswm $2 && $3,$replace($3-,$chr(32),$chr(43)) $2,$replace($2-,$chr(32),$chr(43)))
}
#tvrage end
alias tvrage {
  sockopen tvrage tvrage.com 80
  sockmark tvrage $1 $+(/quickinfo.php?show=,$2) $iif($3,$3,)
}

on 1:SOCKOPEN:tvrage:{
  sockwrite -n $sockname GET $gettok($sock(tvrage).mark,2,32) HTTP/1.0
  sockwrite -n $sockname Host: tvrage.com
  sockwrite -n $sockname $crlf
}

on 1:SOCKREAD:tvrage:{
  var %tvrage.source | sockread %tvrage.source
  if ($regex(%tvrage.source,/Show Name@(.*)/)) { set %tvrage.show $regml(1) }
  if ($regex(%tvrage.source,/Show URL@(.*)/)) { set %tvrage.url $regml(1) }
  if ($regex(%tvrage.source,/Premiered@(.*)/)) { set %tvrage.premiered $regml(1) }
  if ($regex(%tvrage.source,/Started@(.*)/)) { set %tvrage.started $regml(1) }
  if ($regex(%tvrage.source,/Ended@(.*)/)) { set %tvrage.ended $regml(1) }
  if ($regex(%tvrage.source,/Latest Episode@(.*)/)) { set %tvrage.last $regml(1) }
  if ($regex(%tvrage.source,/Next Episode@(.*)/)) { set %tvrage.next $regml(1) }
  if ($regex(%tvrage.source,/Country@(.*)/)) { set %tvrage.country $regml(1) }
  if ($regex(%tvrage.source,/Status@(.*)/)) { set %tvrage.status $regml(1) }
  if ($regex(%tvrage.source,/Classification@(.*)/)) { set %tvrage.classification $regml(1) }
  if ($regex(%tvrage.source,/Genres@(.*)/)) { set %tvrage.genres $regml(1) }
  if ($regex(%tvrage.source,/Network@(.*)/)) { set %tvrage.network $regml(1) }
  if ($regex(%tvrage.source,/Airtime@(.*)/)) { set %tvrage.airtime $regml(1) }
  if ($regex(%tvrage.source,/Runtime@(.*)/)) { set %tvrage.runtime $regml(1) minutes }
}

on 1:SOCKCLOSE:tvrage:{
  tokenize 32 $sock(tvrage).mark
  if (!$3) {
    if (!%tvrage.next && !%tvrage.last) { .msg $1 No show matching $qt($replace($gettok($2,2,61),$chr(43),$chr(32))) was found. | unset %tvrage.* | return }
    var %next.date $gettok($gettok(%tvrage.next,3,94),1,47) $iif($len($gettok($gettok(%tvrage.next,3,94),2,47)) == 2,$ord($gettok($gettok(%tvrage.next,3,94),2,47)),$gettok($gettok(%tvrage.next,3,94),2,47)) $gettok($gettok(%tvrage.next,3,94),3,47)
    var %last.date $gettok($gettok(%tvrage.last,3,94),1,47) $iif($len($gettok($gettok(%tvrage.last,3,94),2,47)) == 2,$ord($gettok($gettok(%tvrage.last,3,94),2,47)),$gettok($gettok(%tvrage.last,3,94),2,47)) $gettok($gettok(%tvrage.last,3,94),3,47)
    .msg $1 10Show: %tvrage.show 10Network: %tvrage.network
    $iif(%tvrage.last,.msg $1 10Last Episode: $+($chr(40),S:,$replace($gettok(%tvrage.last, 1, 94),x,/E:),$chr(41)) $gettok(%tvrage.last, 2, 94) $+($chr(40),%last.date,$chr(41)),)
    $iif(%tvrage.next,.msg $1 10Next Episode: $+($chr(40),S:,$replace($gettok(%tvrage.next, 1, 94),x,/E:),$chr(41)) $gettok(%tvrage.next, 2, 94) $+($chr(40),%next.date,$chr(41)) $iif(%tvrage.airtime, @ $airtime(%tvrage.airtime),),) 
    .msg $1 10Status: %tvrage.status 10URL:  $+ %tvrage.url $+ 
  }
  elseif (*-info=* iswm $3) {
    noop $regex($3,/info=(.*)/) | var %tvrage.info $regml(1)
    var %i 1, %x $numtok(%tvrage.info,44), %y
    while (%x >= %i) {
      if ($regex($gettok(%tvrage.info,%i,44),/(url|premiered|started|ended|last|next|country|status|classification|genres|network|airtime|runtime)/)) {
        var %y %y $ucfirst($gettok(%tvrage.info,%i,44)) $+ : ( $iif(%tvrage. [ $+ [ $gettok(%tvrage.info,%i,44) ] ],$v1,N/A) )
      }
      inc %i
    }
    .msg $1 10 $+ %tvrage.show $+ : %y
  }
  unset %tvrage.*
}

alias airtime { if ($isid) { return $regsubex($1,/.* at (\d{2}:\d{2}) (\w{2})/, \1\2) } }

Comments

Sign in to comment.
joelp53   -  May 24, 2010

Use this man Commands to show how to use script is !rage
All other commands are the same.

/*
+--------------------------------------------------------------
| TV Rage v1.0 - by FamilyGuy
+--------------------------------------------------------------
| This is a script written for the IRC client mIRC, and is
| primarily ment for using on a mIRC based bot.
+--------------------------------------------------------------
*/
#tvrage on
on 1:TEXT:!tvrage *:#:{
  if (%aflood. [ $+ [ $nick ] ]) { halt }
  set -u5 %aflood. [ $+ [ $nick ] ] 1
  if (!$2) { .msg # Syntax: .tvrage [--info[=item]] <show> | return }
  tvrage # $iif(*-info=* iswm $2 && $3,$replace($3-,$chr(32),$chr(43)) $2,$replace($2-,$chr(32),$chr(43)))
}
#tvrage end
alias tvrage {
  sockopen tvrage services.tvrage.com 80
  sockmark tvrage $1 $+(/tools/quickinfo.php?show=,$2) $iif($3,$3,)
}

on 1:SOCKOPEN:tvrage:{
  sockwrite -n $sockname GET $gettok($sock(tvrage).mark,2,32) HTTP/1.0
  sockwrite -n $sockname Host: services.tvrage.com
  sockwrite -n $sockname $crlf
}

on 1:SOCKREAD:tvrage:{
  var %tvrage.source | sockread %tvrage.source
  if ($regex(%tvrage.source,/Show Name@(.*)/)) { set %tvrage.show $regml(1) }
  if ($regex(%tvrage.source,/Show URL@(.*)/)) { set %tvrage.url $regml(1) }
  if ($regex(%tvrage.source,/Premiered@(.*)/)) { set %tvrage.premiered $regml(1) }
  if ($regex(%tvrage.source,/Started@(.*)/)) { set %tvrage.started $regml(1) }
  if ($regex(%tvrage.source,/Ended@(.*)/)) { set %tvrage.ended $regml(1) }
  if ($regex(%tvrage.source,/Latest Episode@(.*)/)) { set %tvrage.last $regml(1) }
  if ($regex(%tvrage.source,/Next Episode@(.*)/)) { set %tvrage.next $regml(1) }
  if ($regex(%tvrage.source,/Country@(.*)/)) { set %tvrage.country $regml(1) }
  if ($regex(%tvrage.source,/Status@(.*)/)) { set %tvrage.status $regml(1) }
  if ($regex(%tvrage.source,/Classification@(.*)/)) { set %tvrage.classification $regml(1) }
  if ($regex(%tvrage.source,/Genres@(.*)/)) { set %tvrage.genres $regml(1) }
  if ($regex(%tvrage.source,/Network@(.*)/)) { set %tvrage.network $regml(1) }
  if ($regex(%tvrage.source,/Airtime@(.*)/)) { set %tvrage.airtime $regml(1) }
  if ($regex(%tvrage.source,/Runtime@(.*)/)) { set %tvrage.runtime $regml(1) minutes }
}

on 1:SOCKCLOSE:tvrage:{
  tokenize 32 $sock(tvrage).mark
  if (!$3) {
    if (!%tvrage.next && !%tvrage.last) { .msg $1 No show matching $qt($replace($gettok($2,2,61),$chr(43),$chr(32))) was found. | unset %tvrage.* | return }
    var %next.date $gettok($gettok(%tvrage.next,3,94),1,47) $iif($len($gettok($gettok(%tvrage.next,3,94),2,47)) == 2,$ord($gettok($gettok(%tvrage.next,3,94),2,47)),$gettok($gettok(%tvrage.next,3,94),2,47)) $gettok($gettok(%tvrage.next,3,94),3,47)
    var %last.date $gettok($gettok(%tvrage.last,3,94),1,47) $iif($len($gettok($gettok(%tvrage.last,3,94),2,47)) == 2,$ord($gettok($gettok(%tvrage.last,3,94),2,47)),$gettok($gettok(%tvrage.last,3,94),2,47)) $gettok($gettok(%tvrage.last,3,94),3,47)
    .msg $1 10Show: %tvrage.show 10Network: %tvrage.network
    $iif(%tvrage.last,.msg $1 10Last Episode: $+($chr(40),S:,$replace($gettok(%tvrage.last, 1, 94),x,/E:),$chr(41)) $gettok(%tvrage.last, 2, 94) $+($chr(40),%last.date,$chr(41)),)
    $iif(%tvrage.next,.msg $1 10Next Episode: $+($chr(40),S:,$replace($gettok(%tvrage.next, 1, 94),x,/E:),$chr(41)) $gettok(%tvrage.next, 2, 94) $+($chr(40),%next.date,$chr(41)) $iif(%tvrage.airtime, @ $airtime(%tvrage.airtime),),) 
    .msg $1 10Status: %tvrage.status 10URL:  $+ %tvrage.url $+ 
  }
  elseif (*-info=* iswm $3) {
    noop $regex($3,/info=(.*)/) | var %tvrage.info $regml(1)
    var %i 1, %x $numtok(%tvrage.info,44), %y
    while (%x >= %i) {
      if ($regex($gettok(%tvrage.info,%i,44),/(url|premiered|started|ended|last|next|country|status|classification|genres|network|airtime|runtime)/)) {
        var %y %y $ucfirst($gettok(%tvrage.info,%i,44)) $+ : ( $iif(%tvrage. [ $+ [ $gettok(%tvrage.info,%i,44) ] ],$v1,N/A) )
      }
      inc %i
    }
    .msg $1 10 $+ %tvrage.show $+ : %y
  }
  unset %tvrage.*
}

alias airtime { if ($isid) { return $regsubex($1,/.* at (\d{2}:\d{2}) (\w{2})/, \1\2) } }

on $*:text:/[@!.]rage */Si:#: {
  if ($left($1-,1) == @) {
    msg $chan Use Commands As !tvrage (Search) I.E !tvrage House.

  }
  else .notice $nick Use Command as !tvrage (Search) I.E !tvrage House.

}
 Respond  
blockstar   -  May 23, 2010

i keep getting
No Such Show, Check your spelling and try again.
how do i fix that i am using the tvrage.mrc

 Respond  
joelp53   -  May 19, 2010

Here is an updated adition Afetr the recent TVrage.com update.
However please not that for some strange reason it takes longer to get the info.

Edit sorry my bad didn't see the fix x714x put up :)

 Respond  
MashhitDK   -  May 18, 2010

Thanks...
Awesome...

 Respond  
x714x   -  May 18, 2010

Change these lines and it will work fine....

sockmark tvrage $1 $+(/quickinfo.php?show=,$2) $iif($3,$3,)
to
sockmark tvrage $1 $+(/tools/quickinfo.php?show=,$2) $iif($3,$3,)

and...

sockwrite -n $sockname Host: tvrage.com
to
sockwrite -n $sockname Host: services.tvrage.com
 Respond  
MashhitDK   -  May 16, 2010

My limited skills are total basic...

I did try to fix it yesterday...
But yeah... really don't know what I'm doing :P

  • And on TVRage.com there is no info about what to use now...
    It still says to use the old link under http://services.tvrage.com/
    So I gave up...

But as I said... would really appreciate an update of this script...

  • I would love you looong time xD

Or if someones got the skills ( and the time ) and completely new TVRage script... :P
With more features added...

Well enough SPAM and begging for now... :P

 Respond  
Jethro   -  May 16, 2010

The links have changed. You may want to look at that.

 Respond  
MashhitDK   -  May 16, 2010

Yeah... not working...

Would really appreciate an update of the script xD

 Respond  
lg84   -  May 14, 2010

tvrage has changed their layout any chance of an update to correct this and make this script work

 Respond  
MashhitDK   -  Apr 18, 2010

Am gonna try it...

Thanks... xD

EDIT:

I think henbone11 means info about the show ?
So it will give you info about what the show is about...
or what the next episode is about... or however it works on TVRage.

 Respond  
henbone11   -  Apr 02, 2010

yeah, like /summary. something that would return the summary of an episode.

 Respond  
Ayon   -  Apr 01, 2010

a summmary? sorry, but i dunno what you mean

 Respond  
henbone11   -  Apr 01, 2010

is there anyway to add a summary to this?

 Respond  
Ayon   -  Apr 01, 2010

thanks for the heads up x714x! It's fixed now :) my bad for doing a bad job when changing it from my version to an allround snippet

 Respond  
x714x   -  Apr 01, 2010

A little typo causing it not to work...

on 1:TEXT:!tvrage *):#:{

Just remove the ). Also It wouldn't show the showname on the reply so I removed the $utf8 off the tvrage.show variable.

.msg $1 10Show: $utf8(%tvrage.show)

to

.msg $1 10Show: %tvrage.show

 Respond  
henbone11   -  Mar 29, 2010

this doesnt work for me. to be honest, the other tvrage script that automatically shows next/last info is probably more convenient.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.