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.

Display IRC convo on the web site (PHP?)

Old posts that have not been replied to for several years.
Locked
d
d3vlabs
Voice
Posts: 6
Joined: Tue Jun 28, 2005 7:39 pm

Display IRC convo on the web site (PHP?)

Post by d3vlabs »

Looking for a script that would allow me to take part of the conversation that's going on in certain IRC channel (let's say last 5 lines) and display it on my web site in a module.

I currently have perl/php/cgi/sql/xml/dhtml/java/javascript enabled and working just fine, so those are the options for such a module.

This will possibly require a TCL script from an eggdrop as well, which will transfer the info to the web site.

The module on the site can be real-time (live) which will display text as it occurs on IRC, it could be delayed with let's say 30 second refresh or it could be updated through manual refresh only by the user.

Please post if you have any ideas/comments/suggestions/theories/files/flaming and etc...

Thanks for your time.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I believe this is not eggdrop-related, you need a web-based (PHP/ASP) IRC client (which of course installs on the web server), there are plenty of those, try googling
d
d3vlabs
Voice
Posts: 6
Joined: Tue Jun 28, 2005 7:39 pm

Post by d3vlabs »

I got a sweet heavily modified CGI/Perl/PHP script running here:
http://d3v.clanhq.net/mambo/cgiirc/irc.cgi

and I also have modified PJIRC with custom PHP login page on the site as well...

My request is a bit different however. I want people to see the current CONVO on IRC without being able to reply or anything like that. Simply so that that they can see if anyone is in channel or if they wish to join and contribute to the conversation.

Thank you for quick reply
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

set buf {}

set maxlines 5 ;# lines
set refresh 30 ;# seconds

bind pubm - "#channel *" foo

proc foo {n u h c t} {
   if {[llength $::buf] == $::maxlines} {
      set ::buf [lreplace $::buf 0 0]
   }
   lappend ::buf [list $n $t]
}

proc bar {sec} {
   if ![catch {set fd [open /path/to/convo.html w]}] {
      puts $fd "<html><head><title>some title</title>"
      puts $fd "<meta http-equiv=\"refresh\" content=\"$sec\">"
      puts $fd "</head><body>"
      foreach e $::buf {
         puts $fd "<[lindex $e 0]> [lindex $e 1]<br>"
      }
      puts $fd "</body></html>" 
      close $fd
   }
   utimer $sec [list bar $sec]
}

bar $refresh
d
d3vlabs
Voice
Posts: 6
Joined: Tue Jun 28, 2005 7:39 pm

Post by d3vlabs »

TCL script that I have to compile?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

since you are already here, i.e. you have registered and posted an article on these forums, it's assumed you already know at least how to install Tcl scripts on eggdrop; if you don't, go RTFM
d
d3vlabs
Voice
Posts: 6
Joined: Tue Jun 28, 2005 7:39 pm

Post by d3vlabs »

rofl

I was just asking what is. Had a glimpse at it and it didn't look like PHP. Haven't touched my egg for years. Yeah that should be real easy to install. Thanks once again
Locked