This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

NowPlaying.tcl

Support & discussion of released scripts, and announcements of new releases.
Post Reply
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

NowPlaying.tcl

Post by greenbear »

Kinda pointless, but someone asked for it.

Code: Select all

###
# NowPlaying.tcl v0.1 by greenbear <at> gmail.com
#
# Announce current and upcomming movies at the theatres.

bind pub - !nowplaying pub:playing
bind pub - !commingsoon pub:comming

if ![info exists egghttp(version)] {
  putlog "egghttp.tcl was NOT successfully loaded."
}

proc pub:playing {nick uhost hand chan text} {
  set sock [egghttp:geturl http://www.movietome.com/ [list parse:mtome $chan 0]]
}

proc pub:comming {nick uhost hand chan text} {
  set sock [egghttp:geturl http://www.movietome.com/ [list parse:mtome $chan 1]]
}

proc parse:mtome {chan type sock} {
 set data [egghttp:data $sock]
 egghttp:cleanup $sock

 set data [string map {"\n" ""} $data]
 set data [string map {"<p>" "<p>\n"} $data]

 if {!$type} {
   set to "Recently released movies:"
 } {
   set to "Upcoming movies:"
 }

 foreach line [split $data \n] {
   if [string match -noc "*$to*" $line] {
     set line [string map {"<br>" "<br>\n"} $line]
     regsub -all {<(.|\n)*?>} $line {} line
     foreach out [split $line \n] {
       if ![string match -noc "*Terms of Service*" $out] {
         putserv "PRIVMSG $chan :$out"
       }
     }
     continue
   }
 }
}

putlog "NowPlaying.tcl loaded."
d
deadman
Voice
Posts: 18
Joined: Mon May 08, 2006 6:32 pm

Post by deadman »

Can anyone fix this and it dont seem to work anymore :(
thnx
L
Ladykiller
Voice
Posts: 7
Joined: Sun Feb 18, 2007 4:24 pm

Post by Ladykiller »

errormsg etc.....
Some more infos would be helpfull
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

The website changed and now redirects to filmspot.com.. Would be easier to simply write a new script to work with the new site. I'll put it on my todo list and see if I can get one written in a day or 3.
d
deadman
Voice
Posts: 18
Joined: Mon May 08, 2006 6:32 pm

Post by deadman »

anyone had any look finding a working one wondered y it had stoped working :(
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Post Reply