The purpose is to display a list of users from an IRC channel on a website, which basicly consists of the two sections below.
Here is the piece of TCL code I have used myself to successfully generate a list of users on a channel:
bind time - "?0 * * * *" save:nicklist proc save:nicklist {min hour day mon year} { set file "~/public_html/nicklist.db" set fs [open $file w] set mychan "#HappyMeal" set reg [list] set voi [list] set ops [list] foreach user [internalchanlist $mychan] { if {[isop $user $mychan]} { lappend ops @$user<br /> } elseif {[isvoice $user $mychan]} { lappend voi +$user<br /> } else { lappend reg $user<br /> } } set ops [lsort -dict -increasing $ops] set voi [lsort -dict -increasing $voi] set reg [lsort -dict -increasing $reg] puts $fs "<font color=#FD8500>[join $ops ""]</font> <font color=#C1C1C1>[join $voi ""]</font> <font color=#747474>[join $reg ""]</font>" close $fs }
This code has been tested and found working both in eggdrops and sBNC instances. You might want to change the points pointed out below of the code into something you want.
set file ”~/public_html/nicklist.db”set mychan ”#HappyMeal”color=#FD8500 etc.The last thing you need is some php to reach out for the database we save every 10 minutes above, and display it.
<?php include('http://path.to/nicklist.db'); ?>
I use different servers for the actual nicklist.db and the website, hence the complete URL in the include function.