Make sure that %IJSchannel and %Bident are properly set. Also, create %Sident for the number of seconds, currently 60 seconds; might as well make that consistent with %Bident
Code:
  
[color:#006600];  When I'm the one joining, WHO the channel to fill its IAL.
;[/color]
on me:*:JOIN:#:{
  set -u600 $+(%,me.JOIN.,$chan) 1
  who $chan 
}
raw 352:*:{
  if ($eval($+(%,me.JOIN.,$2),2)) {
    [color:#006600];  Initialize everyone's ident $ctime to 0 since I didn't see them join.[/color]
    hadd -m $2 $remove($3,~) 0 
    halt
  }
}
raw 315:*:{
  if ($eval($+(%,me.JOIN.,$2),2)) {
    unset $+(%,me.JOIN.,$2)
    halt
  }
}
  
[color:#006600];
;  If someone else is joining, process by the rules given in the previous post.
;[/color]
on !*:JOIN:[color:red]%IJSchannel[/color]:{
  var %ctime = $ctime, %ident = $gettok($remove($address,~),1,64), %mask = $+(*!*,$right(%ident,9),@*)
  if ($calc(%ctime - $hget($chan,%ident)) < [color:red]%Sident[/color]) KB-Ops %mask Too fast!  
  elseif ($ialchan(%mask,$chan,0) > [color:red]%Bident[/color])         KB-Ops %mask Too many!
  hadd -m $chan %ident %ctime
}
[color:#006600];  (KickBan minus Ops) Don't kick any ops that might have this ident.
;[/color]
alias -l KB-Ops {
  if ($me !isop $chan) return
  var %-o, %i = 1
  [color:#006600];  Check to see if there are any non-ops to ban.[/color]
  while ($ialchan($1,$chan,%i).nick)) {
    if ($ifmatch !isop $chan) {
      mode $chan +b $1
      %-o = 1
      break
    }
    inc %i
  }
  [color:#006600];  If we found any non-ops, kick them.[/color]
  while ($ialchan($1,$chan,%-o).nick)) {
    var %nick = $ifmatch
    if (%nick !isop $chan) kick $chan %nick $2- 
    inc %-o
  }
}
  
[color:#006600];
;  Handle cleanup of the tables we no longer need.
;[/color]
on me:*:PART:%IJSchannel: hfree $chan
on me:*:QUIT: hfree -w #*

Or something like that - should be fairly close - close enough to get you on the right track. Too tired to test it, though I don't see anything wrong with it.

Last edited by Hammer; 06/01/03 05:32 AM.

DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C