r00t-err0r

nicklist-activeuser

Aug 21st, 2012
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 3.80 KB | None | 0 0
  1. bind time - "*" save:nicklist
  2. proc save:nicklist {min hour day mon year} {
  3.   set file "/var/www/portal/nicklist.html"
  4.   set fs [open $file w]
  5.   set mychan "#X-Chat"
  6.   set reg "";  set voi "";  set ops ""; set hops ""; set acti "";
  7.   foreach user [chanlist $mychan] {
  8.     if {[isop $user $mychan]} {
  9.       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 />"
  10.     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 />" }
  11.    } elseif {[isvoice $user $mychan]} {
  12.       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 />" }
  13.      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 />"
  14.     } else {
  15.    if {[ishalfop $user $mychan]} {
  16.    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 />" }
  17.    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 />"
  18.    } else {
  19.    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 />" }
  20.    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 />"
  21.     }
  22.   }
  23.   }
  24.   set ops [lsort -dict -increasing $ops]
  25.   set hops [lsort -dict -increasing $hops]
  26.   set voi [lsort -dict -increasing $voi]
  27.   set reg [lsort -dict -increasing $reg]
  28.   if {$acti != ""} {
  29.   set acti [lsort -dict -increasing $acti]
  30.   } else { set acti "Nobody...:-(" }
  31.   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>"
  32.   close $fs
  33. }
Advertisement
Add Comment
Please, Sign In to add comment