onlt prob is it doesnt do nothin atall. timer doesnt work i dont think. not sure
any ideas
Code: Select all
set statfile "/home/user/public_html/stats.php"
set channel "#channel"
if {![info exists stats_running]} {
timer 5 statfile:make
set stats_running 1
}
proc statfile:make {args} {
global statfile channel botnick
set topic [topic $channel topic]
set setby [topic $channel nick]
set settime [ctime [topic $channel unixtime]]
set outputfile [open $statfile w]
puts $outputfile "<table width=100% cellspacing=0 cellpadding=0>"
puts $outputfile " <tr>"
puts $outputfile " <td>Stats for $channel</td>"
puts $outputfile " </tr>"
puts $outputfile " <tr>"
puts $outputfile " <td>topic: $topic</td>"
puts $outputfile " </tr>"
puts $outputfile " <tr>"
puts $outputfile " <td>Set by: $setby on $settime</td>"
puts $outputfile " </tr>"
puts $outputfile "</table>"
close $statfile
putlog "Saving $channel stats..."
timer 5 statfilet:make
return 1
}