Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bind time - "*" save:nicklist
- proc save:nicklist {min hour day mon year} {
- set file "/var/www/portal/nicklist.html"
- set fs [open $file w]
- set mychan "#X-Chat"
- set reg ""; set voi ""; set ops ""; set hops ""; set acti "";
- foreach user [chanlist $mychan] {
- if {[isop $user $mychan]} {
- lappend ops "<a href=\"javascript:void(0);\" onmouseover=\"return overlib('Idle: [getchanidle $user $mychan] min.', CAPTION, '$user', WIDTH, 100, AUTOSTATUSCAP, TEXTCOLOR, '#000000', BGCOLOR, 'red', CAPCOLOR, 'white');\" onmouseout=\"return nd();\" style=\"text-decoration:none\"><font color=#FF0000>@$user</font></a><br />"
- if {[getchanidle $user $mychan] <= 5} { lappend acti "<a href=\"javascript:void(0);\" onmouseover=\"return overlib('Idle: [getchanidle $user $mychan] min.', CAPTION, '$user', WIDTH, 100, AUTOSTATUSCAP, TEXTCOLOR, '#000000', BGCOLOR, 'red', CAPCOLOR, 'white');\" onmouseout=\"return nd();\" style=\"text-decoration:none\"><font color=#FF0000>@$user</font></a><br />" }
- } elseif {[isvoice $user $mychan]} {
- if {[getchanidle $user $mychan] <= 5} { lappend acti "<a href=\"javascript:void(0);\" onmouseover=\"return overlib('Idle: [getchanidle $user $mychan] min.', CAPTION, '$user', WIDTH, 100, AUTOSTATUSCAP, TEXTCOLOR, '#000000', BGCOLOR, 'red', CAPCOLOR, 'white');\" onmouseout=\"return nd();\" style=\"text-decoration:none\"><font color=#009900>+$user</font></a><br />" }
- lappend voi "<a href=\"javascript:void(0);\" onmouseover=\"return overlib('Idle: [getchanidle $user $mychan] min.', CAPTION, '$user', WIDTH, 100, AUTOSTATUSCAP, TEXTCOLOR, '#000000', BGCOLOR, 'red', CAPCOLOR, 'white');\" onmouseout=\"return nd();\" style=\"text-decoration:none\"><font color=#009900>+$user</font></a><br />"
- } else {
- if {[ishalfop $user $mychan]} {
- if {[getchanidle $user $mychan] <= 5} { lappend acti "<a href=\"javascript:void(0);\" onmouseover=\"return overlib('Idle: [getchanidle $user $mychan] min.', CAPTION, '$user', WIDTH, 100, AUTOSTATUSCAP, TEXTCOLOR, '#000000', BGCOLOR, 'red', CAPCOLOR, 'white');\" onmouseout=\"return nd();\" style=\"text-decoration:none\"><font color=#FD8500>%$user</font></a><br />" }
- lappend hops "<a href=\"javascript:void(0);\" onmouseover=\"return overlib('Idle: [getchanidle $user $mychan] min.', CAPTION, '$user', WIDTH, 100, AUTOSTATUSCAP, TEXTCOLOR, '#000000', BGCOLOR, 'red', CAPCOLOR, 'white');\" onmouseout=\"return nd();\" style=\"text-decoration:none\"><font color=#FD8500>%$user</font></a><br />"
- } else {
- if {[getchanidle $user $mychan] <= 5} { lappend acti "<a href=\"javascript:void(0);\" onmouseover=\"return overlib('Idle: [getchanidle $user $mychan] min.', CAPTION, '$user', WIDTH, 100, AUTOSTATUSCAP, ABOVE, TEXTCOLOR, '#000000', BGCOLOR, 'red', CAPCOLOR, 'white');\" onmouseout=\"return nd();\" style=\"text-decoration:none\"><font color=#5F5F5F>$user</font></a><br />" }
- lappend reg "<a href=\"javascript:void(0);\" onmouseover=\"return overlib('Idle: [getchanidle $user $mychan] min.', CAPTION, '$user', WIDTH, 100, AUTOSTATUSCAP, ABOVE, TEXTCOLOR, '#000000', BGCOLOR, 'red', CAPCOLOR, 'white');\" onmouseout=\"return nd();\" style=\"text-decoration:none\"><font color=#5F5F5F>$user</font></a><br />"
- }
- }
- }
- set ops [lsort -dict -increasing $ops]
- set hops [lsort -dict -increasing $hops]
- set voi [lsort -dict -increasing $voi]
- set reg [lsort -dict -increasing $reg]
- if {$acti != ""} {
- set acti [lsort -dict -increasing $acti]
- } else { set acti "Nobody...:-(" }
- puts $fs "<html><head><script type=\"text/javascript\" src=\"overlib.js\"></script></head><body><div id=\"overDiv\" style=\"position:absolute; visibility:hidden; z-index:1000;\"></div><b>Modes:</b> [getchanmode $mychan]<hr><b>Active IRC users:</b><br>[join $acti ""]<hr>[join $ops ""] [join $hops ""] [join $voi ""][join $reg ""]</body></html>"
- close $fs
- }
Advertisement
Add Comment
Please, Sign In to add comment