Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
; =============================== ; TVRage Script v1 by ES and hxck ; =============================== on *:LOAD: { /echo -s TVRage v1 :: $chr(91) ES & hxck $chr(93) has been loaded. Type !tvhelp for a list of commands. http://www.hawkee.com/snippet/8822/ } on *:TEXT:!tvhelp:#: { msg # !n|!next - Get next episode information (ie !n Dexter) msg # !l|!last - Get last episode information (ie !l Dexter) msg # !tv - Get general show information (ie !tv Dexter) msg # !ep seasonXepisode show - Get episode summary (ie !ep 1x2 Dexter) msg # !show - Get show summary (ie !show Dexter) } menu Channel,Status { .$iif($group(#TVR) == On,$style(1)) ES/hxck ..$iif($group(#TVR) == On,$style(2)) TVRage On: .enable #TVR ..$iif($group(#TVR) == Off,$style(2)) TVRage Off: .disable #TVR } #TVR on on *:TEXT:!*:#: { ; =========================== ; Close sockets if we need to ; =========================== if ($sock(tvrage)) { sockclose tvrage } if ($sock(tvrage2)) { sockclose tvrage2 } if ($sock(tvrage3)) { sockclose tvrage3 } ; =========================== ; Set different triggers here ; =========================== if (($1 == !n) || ($1 == !next)) { if (!$2) { msg # Syntax: !n <show name> } if ($2) { set %tvr.output next set %tvr.show $replace($2-,$chr(32),$chr(37) $+ 20) sockopen -n tvrage services.tvrage.com 80 sockmark tvrage msg # } } if (($1 == !l) || ($1 == !last)) { if (!$2) { msg # Syntax: !l <show name> } if ($2) { set %tvr.output last set %tvr.show $replace($2-,$chr(32),$chr(37) $+ 20) sockopen -n tvrage services.tvrage.com 80 sockmark tvrage msg # } } if ($1 == !tv) { if (!$2) { msg # Syntax: !tv <show name> } if ($2) { set %tvr.output info set %tvr.show $replace($2-,$chr(32),$chr(37) $+ 20) sockopen -n tvrage services.tvrage.com 80 sockmark tvrage msg # } } if ($1 == !ep) { if (!$2) { msg # Syntax: !ep <ep number, eg 1x1> <show name> | halt } if (!$3) { msg # Syntax: !ep <ep number, eg 1x1> <show name> | halt } else { set %tvr.output.nick $nick set %tvr.output epsummary set %tvr.show $replace($3-,$chr(32),$chr(37) $+ 20) set %tvr.epnum $2 sockopen -n tvrage services.tvrage.com 80 } } if ($1 == !show) { if (!$2) { msg # Syntax: !show <show name> } else { set %tvr.output.nick $nick set %tvr.show $replace($2-,$chr(32),$chr(37) $+ 20) set %tvr.output showsummary sockopen -n tvrage services.tvrage.com 80 sockmark tvrage msg # } } else halt } ; =========================== ; Handle sockopen events here ; =========================== on *:SOCKOPEN:tvrage: { var %s sockwrite -n $sockname if ($sockerr) { $sock(tvrage).mark Socket Error: $sock(tvrage).wsmsg } %s GET /tools/quickinfo.php?show= $+ %tvr.show $+ &ep= $+ %tvr.epnum HTTP/1.1 %s Host: services.tvrage.com %s Connection: close %s $crlf } on *:SOCKOPEN:tvrage2: { var %s sockwrite -n $sockname if ($sockerr) { $sock(tvrage2).mark Socket Error: $sock(tvrage2).wsmsg } %s GET %tvr.epsumurl HTTP/1.1 %s Host: www.tvrage.com %s Connection: close %s $crlf } on *:SOCKOPEN:tvrage3: { var %s sockwrite -n $sockname if ($sockerr) { $sock(tvrage3).mark Socket Error: $sock(tvrage3).wsmsg } %s GET /myfeeds/showinfo.php?key=sqsTSaJG4qJagM6ldpKZ&sid= $+ %tvr.showid HTTP/1.1 %s Host: services.tvrage.com %s Connection: close %s $crlf } ; =========================== ; Handle sockread events here ; =========================== on *:SOCKREAD:tvrage: { if ($sockerr) { $sock(tvrage).mark Socket Error: $sock(tvrage).wsmsg } var %tvrtemp sockread %tvrtemp ; ============================ ; Set !n !l !tv variables here ; ============================ if ((%tvr.output == next) || (%tvr.output == last) || (%tvr.output == info)) { if (Show Name isin %tvrtemp) { set %tvr.showname $gettok(%tvrtemp,2,64) } if (Show URL isin %tvrtemp) { set %tvr.url $gettok(%tvrtemp,2,64) } if (Premiered isin %tvrtemp) { set %tvr.premiered $gettok(%tvrtemp,2,64) } if (Started isin %tvrtemp) { set %tvr.started $gettok(%tvrtemp,2,64) } if (Ended isin %tvrtemp) { set %tvr.ended $gettok(%tvrtemp,2,64) } if (Country isin %tvrtemp) { set %tvr.country $gettok(%tvrtemp,2,64) } if (Status isin %tvrtemp) { set %tvr.status $gettok(%tvrtemp,2,64) } if (Classification isin %tvrtemp) { set %tvr.class $gettok(%tvrtemp,2,64) } if (Genres isin %tvrtemp) { set %tvr.genres $gettok(%tvrtemp,2,64) } if (Network isin %tvrtemp) { set %tvr.network $gettok(%tvrtemp,2,64) } if (Airtime isin %tvrtemp) { set %tvr.airtime $gettok(%tvrtemp,2,64) } if (Runtime isin %tvrtemp) { set %tvr.runtime $gettok(%tvrtemp,2,64) } if (Next Episode isin %tvrtemp) { set %tvr.nextemp $gettok(%tvrtemp,2,64) set %tvr.nextepnum $gettok(%tvr.nextemp,1,94) set %tvr.nextepname $gettok(%tvr.nextemp,2,94) set %tvr.nextepday $gettok(%tvr.nextemp,3,94) } if (Latest Episode isin %tvrtemp) { set %tvr.lastemp $gettok(%tvrtemp,2,64) set %tvr.lastepnum $gettok(%tvr.lastemp,1,94) set %tvr.lastepname $gettok(%tvr.lastemp,2,94) set %tvr.lastepday $gettok(%tvr.lastemp,3,94) } if (GMT+0 NODST isin %tvrtemp) { set %tvr.airnextepcmt $calc($gettok(%tvrtemp,2,64) - 36004 - $gmt) } if (%tvr.country == Australia) { set %tvr.airnextepcmt $calc($gettok(%tvrtemp,2,64) - 28800 - $gmt) } } ; ============================== ; Set 1st !tvinfo variables here ; ============================== if (%tvr.output == showsummary) { if (Show ID isin %tvrtemp) { set %tvr.showid $gettok(%tvrtemp,2,64) } if (Show Name isin %tvrtemp) { set %tvr.showname $gettok(%tvrtemp,2,64) } if (Show URL isin %tvrtemp) { set %tvr.url $gettok(%tvrtemp,2,64) } } ; ========================== ; Set 1st !ep variables here ; ========================== if (%tvr.output == epsummary) { if (Episode URL isin %tvrtemp) { set %tvr.url $gettok(%tvrtemp,2,64) set %tvr.epsumurl $remove($gettok(%tvrtemp,2,64),http://www.tvrage.com) } if (Episode info isin %tvrtemp) { set %tvr.epnumout $gettok($gettok(%tvrtemp,2,64),1,94) set %tvr.epname $gettok($gettok(%tvrtemp,2,64),2,94) set %tvr.epair $gettok($gettok(%tvrtemp,2,64),3,94) } if (Show Name isin %tvrtemp) { set %tvr.showname $gettok(%tvrtemp,2,64) } } } on *:SOCKREAD:tvrage2: { if ($sockerr) { $sock(tvrage).mark Socket Error: $sock(tvrage2).wsmsg } ; ========================== ; Set 2nd !ep variables here ; ========================== var %tvrtemp2 sockread %tvrtemp2 if (%tvr.epsum.temp == 1) { set %tvr.epsum %tvrtemp2 set %tvr.epsum.temp 0 } if (<div class='show_synopsis'> isin %tvrtemp2) { set %tvr.epsum.temp 1 } } on *:SOCKREAD:tvrage3: { if ($sockerr) { $sock(tvrage).mark Socket Error: $sock(tvrage3).wsmsg } ; ============================== ; Set 2nd !tvinfo variables here ; ============================== var %tvrtemp3 sockread %tvrtemp3 if (<image> isin %tvrtemp3) { set %tvr.showpic $between(%tvrtemp3,<image>,</image>,1) } if (<summary> isin %tvrtemp3) { set %tvr.showsummary $between(%tvrtemp3,<summary>,</summary>,1) } } ; ============================ ; Handle sockclose events here ; ============================ on *:SOCKCLOSE:tvrage: { ; ============================ ; Next Episode ; ============================ if (%tvr.output == next) { if ((%tvr.nextemp != $null) && (%tvr.nextepday == TBA)) { $sock(tvrage).mark $chr(91) 07 $+ %tvr.showname $+ $chr(93) :: $chr(91) 6 $+ Airs %tvr.airtime on %tvr.network $+ $chr(93) :: $chr(91) $+ 7 %tvr.nextepnum $+ $chr(93) :: $chr(91) 7 $+ %tvr.nextepname $+ $chr(93) :: $chr(91) 7 $+ %tvr.nextepday $+ $chr(93) unset %tvr.* | halt } if (%tvr.nextemp != $null) && (Season isin %tvr.nextepname) && (%tvr.nextepday == TBA) { $sock(tvrage).mark $chr(91) 07 $+ %tvr.showname $+ $chr(93) :: $chr(91) 6 $+ Airs %tvr.airtime on %tvr.network $+ $chr(93) :: $chr(91) $+ 7 %tvr.nextepnum $+ $chr(93) :: $chr(91) 7 $+ %tvr.nextepname $+ $chr(93) :: $chr(91) 7 $+ %tvr.nextepday $+ $chr(93) unset %tvr.* | halt } if (%tvr.nextemp != $null) && (Season isin %tvr.nextepname) && (/ isin %tvr.nextepday) { $sock(tvrage).mark $chr(91) 07 $+ %tvr.showname $+ $chr(93) :: $chr(91) 6 $+ Airs %tvr.airtime on %tvr.network $+ $chr(93) :: $chr(91) $+ 7 %tvr.nextepnum $+ $chr(93) :: $chr(91) 7 $+ %tvr.nextepname $+ $chr(93) $iif($left(%tvr.airnextepcmt,1) != -,:: $chr(91) 7 $+ %tvr.nextepday $+ $chr(93) :: $chr(91) 6 $+ Airing in: $betterduration(%tvr.airnextepcmt) $+ $chr(93),:: $chr(91) 7 $+ %tvr.nextepday $+ $chr(93) 6 $+ Aired: $betterduration(%tvr.airnextepcmt) ago. ) unset %tvr.* | halt } if (%tvr.nextemp != $null) { $sock(tvrage).mark $chr(91) 07 $+ %tvr.showname $+ $chr(93) :: $chr(91) 6 $+ Airs %tvr.airtime on %tvr.network $+ $chr(93) :: $chr(91) $+ 7 %tvr.nextepnum $+ $chr(93) :: $chr(91) 7 $+ %tvr.nextepname $+ $chr(93) $iif($left(%tvr.airnextepcmt,1) != -,:: $chr(91) 7 $+ %tvr.nextepday $+ $chr(93) :: $chr(91) 6 $+ Airing in: $betterduration(%tvr.airnextepcmt) $+ $chr(93),:: $chr(91) 7 $+ %tvr.nextepday $+ $chr(93) 6 $+ Aired: $betterduration(%tvr.airnextepcmt) ago. ) unset %tvr.* | halt } if (%tvr.nextemp == $null) { $sock(tvrage).mark Next episode information for %tvr.showname is unavailable. unset %tvr.* | halt } } ; ============================ ; Last Episode ; ============================ if (%tvr.output == last) { if (%tvr.lastemp != $null) { $sock(tvrage).mark $chr(91) 07 $+ %tvr.showname $+ $chr(93) :: $chr(91) $iif(%tvr.ended != $null,06 $+ Aired,06 $+ Airs) %tvr.airtime on %tvr.network $+ $chr(93) :: $chr(91) 07 $+ %tvr.lastepnum $chr(93) :: $chr(91) 07 $+ %tvr.lastepname $+ $chr(93) :: $chr(91) 06 $+ %tvr.lastepday $+ $chr(93) :: $chr(91) 07 $+ https://broadcasthe.net/torrents.php?searchstr= $+ $replace(%tvr.showname,$chr(32),$chr(43)) $+ $chr(43) $+ s $+ $replace(%tvr.lastepnum,x,e) $+ $chr(93) unset %tvr.* | halt } if (%tvr.nextemp == $null) { $sock(tvrage).mark Last episode information for 07 $+ $replace(%tvr.show,$chr(37) $+ 20,$chr(32)) is unavailable. unset %tvr.* | halt } } ; ============================ ; Show Information ; ============================ if (%tvr.output == info) { ; msg %tvr.output.chan if (%tvr.showname != $null) { $sock(tvrage).mark $chr(91) 07 $+ %tvr.showname $+ $chr(93) :: 06 $+ %tvr.url $+ if (%tvr.ended != $null) { $sock(tvrage).mark 07 $+ Premiered: $+ 06 $+ %tvr.started - 07 $+ Ended: $+ %tvr.ended $+ } else { $sock(tvrage).mark 07 $+ Premiered: $+ 6 $+ %tvr.started $+ - 6 $+ %tvr.status 7 $+ ( $+ %tvr.country $+ ) $+ } $sock(tvrage).mark 7 $+ Airs $+ 6 $+ %tvr.airtime $+ 7 $+ on $+ 6 $+ %tvr.network $+ 7 $+ ( $+ %tvr.runtime min $+ ) $+ $sock(tvrage).mark 6 $+ %tvr.genres $+ $sock(tvrage).mark 7 $+ Classification: $+ 6 $+ %tvr.class $+ unset %tvr.* | halt } if (%tvr.showname == $null) { $sock(tvrage).mark Show does not exist. Please check your spelling and try again. unset %tvr.* | halt } } ; ============================ ; Ep Information ; ============================ if (%tvr.output == epsummary) { sockopen -n tvrage2 www.tvrage.com 80 } ; ============================ ; TVinfo Information ; ============================ if (%tvr.output == showsummary) { sockopen -n tvrage3 services.tvrage.com 80 } } on *:SOCKCLOSE:tvrage2: { ; ============================ ; Ep Information ; ============================ if (Click Here To Add isin %tvr.epsum) { notice %tvr.output.nick Sorry, no summary availible for episode %tvr.epnumout of %tvr.showname } else { notice %tvr.output.nick $chr(91) 7 $+ %tvr.showname $+ $chr(93) $chr(91) $+ 7 %tvr.epnumout - %tvr.epname $+ $chr(93) $chr(91) $+ 7 %tvr.epair $+ $chr(93) 6 $+ %tvr.url $+ notice %tvr.output.nick $nohtml(%tvr.epsum) ;unset %tvr.* | halt } } on *:SOCKCLOSE:tvrage3: { ; ============================ ; Show Summary ; ============================ query %tvr.output.nick $chr(91) 7 $+ %tvr.showname $chr(93) 6 $+ %tvr.url $+ query %tvr.output.nick $replace(%tvr.showsummary,",") query %tvr.output.nick $chr(91) 7 $+ Show image $+ $chr(93) %tvr.showpic /close -m %tvr.output.nick unset %tvr.* | halt } ; =========================== ; Aliases ; =========================== alias -l nohtml { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, ) return %x } alias between { noop $regex($1,/\Q $+ $2 $+ \E(.*?)\Q $+ $3 $+ \E/gi) | return $regml($4) } ; ============================================== ; Thanks to http://www.nealirc.org/IRC/mIRC.html ; ============================================== alias betterduration { var %lifeseconds = $abs($1) var %age, %years, %months, %days, %hours, %minutes, %seconds, %temp %years = $int($calc(%lifeseconds / 31557600)) if (%years != 0) %age = %years year $+ $iif(%years > 1,s) $+ , %temp = $calc(%lifeseconds - (%years * 31557600)) %months = $int($calc(%temp / 2678400)) if (%months != 0) %age = %age %months month $+ $iif(%months > 1,s) $+ , %temp = $calc(%temp - (%months * 2678400)) %weeks = $int($calc(%temp / 604800)) if (%weeks != 0) %age = %age %weeks week $+ $iif(%weeks > 1,s) $+ , %temp = $calc(%temp - (%weeks * 604800)) %days = $int($calc(%temp / 86400)) if (%days != 0) %age = %age %days day $+ $iif(%days > 1,s) $+ , %temp = $calc(%temp - (%days * 86400)) %hours = $int($calc(%temp / 3600)) if (%hours != 0) %age = %age %hours hour $+ $iif(%hours > 1,s) $+ , %temp = $calc(%temp - (%hours * 3600)) %minutes = $int($calc(%temp / 60)) if (%minutes != 0) %age = %age %minutes minute $+ $iif(%minutes > 1,s) %seconds = $calc(%temp % 60) if (%seconds != 0) %age = %age and %seconds second $+ $iif(%seconds > 1,s) if ($right(%age, 1) == $chr(44)) return $left(%age, -1) return %age }
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
Untitled
Python | 1 hour ago | 0.13 KB
Decentralized Moneys
1 hour ago | 0.42 KB
120 million in 5 years
2 hours ago | 0.12 KB
December smells like money
2 hours ago | 0.07 KB
Crypto Liquidity Pools
2 hours ago | 0.47 KB
Trustless Finance
3 hours ago | 0.51 KB
The Lunar Kitsune - Yohana Tsukiko
4 hours ago | 21.38 KB
Crypto profits are insane
4 hours ago | 0.12 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!