Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11722310
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/ForUsers/DANYAL/chanlist2html.tcl b/ForUsers/DANYAL/chanlist2html.tcl
index 6a77591..c6a3aa3 100644
--- a/ForUsers/DANYAL/chanlist2html.tcl
+++ b/ForUsers/DANYAL/chanlist2html.tcl
@@ -1,63 +1,64 @@
#
# This eggdrop TCL script lets you print channel users on a web page.
#
#
# Configuration
# Paths are relative to eggdrop
#
#The channel to save
set chanlist2html(channel) #wolfplex
#The HTML file to write
set chanlist2html(file) users.html
#The HTML template
#Remplace the list code by %%chanlist%%
set chanlist2html(tmpl) users.tmpl
-#The cron interval to regenerate the page
-set chanlist2html(cron) "*/5 * * * *"
+#The interval to regenerate the page in minutes
+set chanlist2html(time) 5
#
# Helper procs
#
#Generates a <ul><li>...<li><li>...<li></ul> HTML code from a list
proc list2ul {list {lineprefix ""}} {
set html "${lineprefix}<ul>\n"
foreach item $list {
append html "${lineprefix}\t<li>${item}</li>\n"
}
append html "${lineprefix}</ul>"
}
#Writes $target with the $channel users list from $template
proc chanlist2html_write {channel template target} {
if [file exists $template] {
set fd [open $template r]
while {![eof $fd]} {
append buffer [gets $fd]
}
close $fd
} {
set buffer "%%chanlist%%"
}
set fd [open $target w]
set chanlist [list2ul [chanlist $channel]]
puts $fd [string map [list %%chanlist%% $chanlist] $buffer]
flush $fd
close $fd
}
#
-# Events code
+# Timer
#
-bind cron - $chanlist2html(cron) cron:chanlist2html
-
-proc cron:chanlist2html {minute hour day weekday year} {
+proc chanlist2html {} {
global chanlist2html
- chanlist2html_write $chanlist2html(channel) $chanlist2html(tmpl) $chanlist2html(file)
+ chanlist2html_write $chanlist2html(channel) $chanlist2html(tmpl) $chanlist2html(file)
+ timer $chanlist2html(time) chanlist2html
}
+
+chanlist2html
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Sep 18, 02:07 (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2989787
Default Alt Text
(1 KB)
Attached To
Mode
rVIPER ViperServ scripts
Attached
Detach File
Event Timeline
Log In to Comment