# # quesedilla # (by robey, 20aug95) # # 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. # # if a user's info line starts with "http://" then their nickname in the # table will be a link to the site listed in their info line. (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 yesterday, and today i cleaned it up a bit and 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" # how often should the html file get updated? # (1 means once every minute, 5 means once every 5 minutes, etc) set web_update 1 # this will help people figure out what timezone you're in :) set webtz "EDT" proc do_ques {} { global channel webfile web_update home-channel botnick webtz set fd [open $webfile w] if {$channel == ""} { puts $fd "The Useless Page" 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!

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

$channel

" 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] if {[string compare [string range $info 0 6] "http://"] == 0} { set link [lindex [split $info] 0] puts $fd "" } { set email [getemail $handle] if {"" != $email} { puts $fd "" } { puts $fd "" } } if {"" == $chop} { set chop "-" } puts $fd "" if {[string compare [string tolower $i] [string tolower $botnick]] == 0} { puts $fd "" } { if {[matchattr $handle t]} { puts $fd "" } { puts $fd "" if {"" != $info} { puts $fd "" } } } } puts $fd "
People on $channel as of [date] [time] $webtz
NicknameStatus" puts $fd "User@Host" foreach i [chanlist] { puts $fd "
$i$i$i${chop}This is me, the channel bot.This is another channel bot.[getchanhost $i]
Info: $info


Created by" puts $fd "" puts $fd "quesedilla via" puts $fd "" puts $fd "eggdrop
" close $fd 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"