;Last line outputted slow, needs removal - Movies slow, TV Shows are fine ;!IMDB Movie Search Script by Ford_Lawnmower irc.Abjects.net #mIRC alias -l IMDB { ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Start Setup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Change %tagcolor to the color you want for tags: var %tagcolor $+($chr(15),$chr(2)) ;;;; Change %textcolor to the color you want for normal text var %textcolor $+($chr(15),$chr(3),04) ;;;; Change %linkcolor to the color/format you want for links var %linkcolor $+($chr(15),$chr(31)) ;;;; Change %ratingcolor+ to the color you want for the positive stars in the rating. var %ratingcolor+ $+($chr(15),$chr(3),04) ;;;; Change %ratingcolor- to the color you want for the negative stars in the rating. var %ratingcolor- $+($chr(15),$chr(3),14) ;;;; You can change the way this script prints out by editing ;;;; %lineone, %linetwo and %linethree below. ;;;; tags must be valid and separated by a space. ;;;; valid tags are as follows: title rating votes genres ;;;; runtime director writer language country date plot ;;;; shortplot cast link trailer reviews critics ;;;; If you want to omit a line, just change it to 0 var %lineone title rating votes reviews critics genres runtime director writer language country date var %linetwo shortplot var %linethree cast link trailer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End Setup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; var %sockname $+(IMDB,$network,$2,$ticks) hadd -m %sockname lineone %lineone hadd %sockname linetwo %linetwo hadd %sockname linethree %linethree sockopen %sockname www.imdb.com 80 sockmark %sockname $1-2 $+(/title/,$3,/) 0 %tagcolor %textcolor %linkcolor 0 0 %ratingcolor+ %ratingcolor- } menu Channel,Status { .$iif($group(#IMDB) == On,$style(1)) IMDB IMDB Trigger ..$iif($group(#IMDB) == On,$style(2)) On: .enable #IMDB ..$iif($group(#IMDB) == Off,$style(2)) Off: .disable #IMDB } #IMDB on On $*:Text:/^(\+|-|!|@|.)(imdb|movie|tvshow|tv).*/Si:#: { if ($left($1,1) == @) set %meth0ds msg $chan if ($left($1,1) == !) set %meth0ds notice $nick if ($left($1,1) == .) set %meth0ds msg $chan var %action $regml(1) if (%action isin +-) && ($regex($nick($chan,$nick).pnick,/(!|~|&|@|%)/)) { if (%action == +) { if ($istok(%IMDBChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is already running the IMDB script } else { .enable #IMDB Set %IMDBChanList $addtok(%IMDBChanList,$+($network,$chan),32) .msg $chan $nick has activated the IMDB script for $chan . } } else { if (!$istok(%IMDBChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is not running the IMDB script } else { Set %IMDBChanList $remtok(%IMDBChanList,$+($network,$chan),1,32) .msg $chan $nick has deactivated the IMDB script for $chan . } } } elseif (!$timer($+(IMDB,$network,$nick))) && ($istok(%IMDBChanList,$+($network,$chan),32)) { .timer $+ $+(IMDB,$network,$nick) 1 6 noop var %method $iif(%action == !,.notice $nick,$iif($regex($nick($chan,$nick).pnick,/(!|~|&|@|%|\+)/),.msg $chan,.notice $nick)) GIMDB %method $2- } } alias EIMDB { GIMDB echo -a $1- } alias -l GIMDB { ; $1-2 Searching For: $3- ............. var %sockname $+(GIMDB,$network,$2,$ticks) sockopen %sockname www.google.com 80 sockmark %sockname $1-2 $+(/search?q=,$replace($3-,$chr(32),+),+site:imdb.com&rls=en&hl=en) $3- ;echo -ga $+(www.google.com/search?q=,$replace($3-,$chr(32),+),+site:imdb.com&rls=en&hl=en) } On *:sockopen:GIMDB*: { if (!$sockerr) { sockwrite -nt $sockname GET $gettok($sock($sockname).mark,3,32) HTTP/1.0 sockwrite -n $sockname Host: www.google.com sockwrite -n $sockname User-Agent: Opera 9.6 sockwrite -n $sockname $crlf } else { echo -st Socket Error $nopath($script) | hfree $sockname | sockclose $sockname } } On *:sockread:GIMDB*: { if ($sockerr) { echo -st Socket Error $nopath($script) | hfree $sockname | sockclose $sockname } else { sockread &GIMDB if ($bintween(&GIMDB,www.imdb.com/title/,/,1)) { IMDB $gettok($sock($sockname).mark,1-2,32) $v1 sockclose $sockname return } elseif ($bintween(&GIMDB,Your search, - did not match any documents.,1)) { $gettok($sock($sockname).mark,1-2,32) Sorry - Cannot find $gettok($sock($sockname).mark,4-,32) sockclose $sockname return } } } On *:sockclose:GIMDB*: { $gettok($sock($sockname).mark,1-2,32) Sorry - Cannot find $gettok($sock($sockname).mark,4-,32) } On *:sockopen:IMDB*: { if (!$sockerr) { sockwrite -nt $sockname GET $gettok($sock($sockname).mark,3,32) HTTP/1.0 sockwrite -n $sockname Host: www.imdb.com sockwrite -n $sockname $crlf } else { echo -st Socket Error $nopath($script) | sockclose $sockname | return } } On *:sockclose:IMDB*: hfree $sockname On *:sockread:IMDB*: { if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return } else { var %IMDb | sockread %IMDb if ($regex(%imdb,/
) sockmark $sockname $puttok($sock($sockname).mark,shortplot:,4,32) elseif (