# # quesedilla # (by robey, 20aug95) # v2 -- 2oct95 # # this will create an html file every so often (the default is once a # minute). the html file will have a table showing the people currently # on the channel, their user@hosts, who's an op, and who's idle. it # uses a table which some browsers (and pseudo-browsers like lynx) can't # see, but it can optionally make a second page which will support these # archaic browsers. browsers supporting push-pull will receive the updated # page automatically periodically. # # if a user's info line or comment line starts with "http://" then their # nickname in the table will be a link to that site. (this way, the # channel "regulars" can have your channel's web page link to their home # page -- while they're on the channel). if the user doesn't have a home # page, but has an email address stored on the bot, that will be their # link instead. # # feel free to modify and play with this. the original was written in # 15 minutes, then at various times i fixed bugs and added features. # softlord helped me make the design look a little nicer. :) if you make # any nifty improvements, please let me know. # robey@lightning.net # you can change this (and probably want to) set webfile "$HOME/public_html/eggdrop.html" # if you want a lynx-viewable version, define this set lynxfile "$HOME/public_html/crappy.html" # how often should the html file get updated? # (1 means once every minute, 5 means once every 5 minutes, etc) set web_update 5 # this will help people figure out what timezone you're in :) set webtz "EDT" proc do_ques {} { global channel webfile lynxfile web_update home-channel botnick webtz set fd [open $webfile w] if {[info exists lynxfile]} { set fdl [open $lynxfile w] } { set fdl [open "/dev/null" w] } puts $fd "" if {$channel == ""} { puts $fd "People on $channel right now" puts $fd "

Oops!

" puts $fd "I'm not on ${home-channel} right now for some reason.
" puts $fd "IRC isn't a very stable place these days... Please try again" puts $fd "later!

" puts $fdl "People on $channel right now" puts $fdl "

Oops!

" puts $fdl "I'm not on ${home-channel} right now for some reason.
" puts $fdl "IRC isn't a very stable place these days... Please try again" puts $fdl "later!

" close $fd close $fdl timer $web_update do_ques return } puts $fd "People on $channel right now" puts $fd "

$channel

" puts $fdl "People on $channel right now" puts $fdl "

$channel

" if {[info exists lynxfile]} { puts $fd "

If this page looks screwy on your browser, try" puts $fd "this page.

" } puts $fd "" puts $fd "" puts $fd "" if {[isop $i]} { set chop "op"} { set chop "" } if {[getchanidle $i] > 10} { if {$chop == ""} { set chop "idle" } { set chop "${chop}, idle" } } set handle [finduser $i![getchanhost $i]] if {[onchansplit $i]} { if {$chop == ""} { set chop "(split)" } { set chop "${chop} (split)" } } set info [getinfo $handle] set comment [getcomment $handle] if {"" == $chop} { set chop "-" } if {[string compare [string range $comment 0 6] "http://"] == 0} { set link "" } { if {[string compare [string range $info 0 6] "http://"] == 0} { set link "" } { set email [getemail $handle] if {("" != $email) && ([string first @ $email] > 0)} { set link "" } { set link "" } } } if {"" != $link} { set elink "" } { set elink "" } puts $fd "" puts $fd "" set chost [getchanhost $i] if {[string compare [string tolower $i] [string tolower $botnick]] == 0} { set chost "This is me, the channel bot." set info "" } { if {[matchattr $handle t]} { set chost "This is another channel bot." set info "" } } puts $fd "" puts $fdl "${link}[format %-9s $i]${elink} [format %-16s $chop] $chost" if {"" != $info} { puts $fd "" puts $fdl " Info: $info" } } puts $fd "
People on $channel as of [date] [time] $webtz
NicknameStatus" puts $fd "User@Host" puts $fdl "People on $channel as of [date] [time] $webtz
"
  puts $fdl "Nickname  Status           User@Host"
  foreach i [chanlist] {
    puts $fd "
${link}${i}${elink}${chop}${chost}
Info: $info

" puts $fdl "" puts $fd "


Created by" puts $fd "" puts $fd "quesedilla v2 via" puts $fd "" puts $fd "eggdrop
" puts $fdl "


Created by" puts $fdl "" puts $fdl "quesedilla v2 via" puts $fdl "" puts $fdl "eggdrop
" puts $fd "
This page is automatically refreshed.
" puts $fd "" puts $fdl "" close $fd close $fdl timer $web_update do_ques } if {![info exists ques_going]} { timer $web_update do_ques set ques_going 1 } putlog "Quesedilla: Web pages will be written to $webfile"