This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Best idea(s) of the millenium!

Old posts that have not been replied to for several years.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

array set nickarray {}

#set this to the special flag the user must have
set nickflag "S"

bind join ${nickflag} "*" chk:join
proc chk:join {nick uh hand chan} {
  global nickarray
  lappend nickarray([string tolower $nick]) $chan
  hi_check $nick cb:voice
}
proc cb:voice {nick x} {
  global nickarray
  foreach chan $nickarray($nick) {
    if {(![isop $nick $chan]) && (![isvoice $nick $chan]) && ([onchan $nick $chan])} {
      pushmode $chan +v $nick
    }
    set nickarray($nick) [lrepleace $nickarray($nick) [set idx [lsearch -exact $nickarray($nick) "$chan"]] $idx]]
  }
}
bind time - "*" chk:time
proc chk:time {min hour day month year} {
  global nickarray nickflag
  set min [string trimleft $min 0]
  if {![expr $min % 5]} {
    foreach chan [channels] {
      foreach nick [chanlist $chan $nickflag] {
        if {(![isop $nick $chan]) && (![isvoice $nick $chan])} {
          hi_check $nick cb:voice
          lappend nickarray([string tolower $nick] $chan
        }
      }
    }
  }
}
Locked