# # quesedilla, by robey # v1 -- 20aug95 # v2 -- 2oct95 [improved it] # v3 -- 17mar96 [fixed it up for 1.0 multi-channel] # fixed 22mar96 by Gord- # fixed 29May96 by Roger Yerramsetti (rogery@zip.com.au) - On the part # that was meant to come up if the bot WASN'T on the # the channel. I simply changed $channel to $chan :) # # 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 ## for each channel you want a webfile for, do this: set webfile(#GayNYC) "/home/ggold/public/safyre/gaynyc.html" set webfile(#GayNYCmature) "/home/ggold/public/safyre/gaynycmature.html" ## define these for channels you want alternate (lynx-friendly) web pages ## for: (the 'lynxfilerf' needs to be relative to your html directory) set lynxfile(#GayNYC) "/home/ggold/public/safyre/gaynyc-lynx.html" set lynxfilerf(#GayNYC) "gaynyc-lynx.html" set lynxfile(#GayNYCmature) "/home/ggold/public/safyre/gaynycmature-lynx.html" set lynxfilerf(#GayNYCmature) "gaynycmature-lynx.html" ## how often should these html files 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 "EST" ## want a background graphic? put its relative path here set background "../nyc01.gif" proc do_ques {} { global webfile lynxfile web_update botnick webtz lynxfilerf background foreach chan [array names webfile] { set fd [open $webfile($chan) w] if {[info exists lynxfile($chan)]} { set fdl [open $lynxfile($chan) w] } else { set fdl [open "/dev/null" w] } puts $fd "" if {![onchan $botnick $chan]} { puts $fd "
"
puts $fd "I'm not on $chan right now for some reason.
"
puts $fd "IRC isn't a very stable place these days... Please try again"
puts $fd "later!
" puts $fdl "
"
puts $fdl "I'm not on $chan 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 0 } puts $fd "
If this page looks screwy on your browser, try" puts $fd "this page.
" } puts $fd "
Nickname | Status" puts $fd " | User@Host"
puts $fdl "People on $chan as of [date] [time] $webtz" puts $fdl "Nickname Status User@Host" foreach i [chanlist $chan] { puts $fd " |
---|