Public paste
Channelz
By: mikeos | Date: Aug 29 2006 13:48 | Format: PHP | Expires: never | Size: 1.32 KB | Hits: 1744

  1. on *:text:!channelz:#:{
  2.  if ($level2 == yes) {
  3.     set %chanz 1
  4.     set %chanzz 1
  5.     unset %chans
  6.     var %i = 1
  7.     while (%i <= $chan(0)) {
  8.       if (%chanz [ $+ [ %chanzz ] ] == 10) {
  9.         inc %chanzz
  10.       }
  11.       if (c !isincs $gettok($chan($chan).mode,1,32)) {
  12.         inc %chanz [ $+ [ %chanzz ] ]
  13.         set %chans [ $+ [ %chanzz ] ] $addtok(%chans [ $+ [ %chanzz ] ],$chan(%i) 12(1 $+ $iif(Q ison $chan(%i),Q,L) $+ 12)1,32)
  14.       }
  15.       elseif (c isincs $gettok($chan($chan).mode,1,32)) {
  16.         inc %chanz [ $+ [ %chanzz ] ]
  17.         set %chans [ $+ [ %chanzz ] ] $addtok(%chans [ $+ [ %chanzz ] ],$chan(%i) ( $+ $iif(Q ison $chan(%i),Q,L) $+ ),32)
  18.       }
  19.       inc %i
  20.     }
  21.     if (c !isincs $gettok($chan($chan).mode,1,32)) {
  22.       var %x = 1
  23.       while (%x <= %chanzz) {
  24.         msg $chan 1,0(7Channels1) - ( $+ %chanz [ $+ [ %x ] ] $+ /10) %chans [ $+ [ %x ] ]
  25.         inc %x
  26.       }
  27.       msg $chan 1,0(7Total Channels1) - ( $+ $chan(0) $+ /20)
  28.     }
  29.     elseif (c isincs $gettok($chan($chan).mode,1,32)) {
  30.       var %x = 1
  31.       while (%x <= %chanzz) {    
  32.         msg $chan (Channels) - ( $+ %chanz [ $+ [ %x ] ] $+ /10) %chans [ $+ [ %x ] ]
  33.         inc %x
  34.       }
  35.       msg $chan (Total Channels) - ( $+ $chan(0) $+ /20)  
  36.     }
  37.     unset %chans*
  38.     unset %chanz*
  39.   }
  40. }
  41.  
Latest pastes
55 minutes ago
10 hours ago
1 days ago
2 days ago
2 days ago