I saw your last post about half-an-hour after you posted it, and wrote this up in about the remaining half-hour. It has been tested to a degree, but I don't guarantee that it's 100%. If you find problems, let me know and I'll see what I can do.
Code:
on *:start:{
  if !$hget(Blacklist) { .hmake Blacklist 100 }
  if $exists(Blacklist.hsh) { .hload Blacklist Blacklist.hsh }
}
on *:exit:{
  .hsave -uo Blacklist Blacklist.hsh
}
on *:disconnect:{
  .hsave -uo Blacklist Blacklist.hsh
}
on !*:join:#:{
  if $hget(Blacklist,$nick) {
    echo -a Blacklisted $nick has joined $chan
    if $me isop $chan {
      .ban -k $chan $nick 2 $hget(Blacklist,$nick) Kick $chr(35) $hget(Blacklist,$+(Count,.,$nick))
    }
  }
}
on *:op:#:{
  blacklist scan $chan
}
on *:serverop:#:{
  blacklist scan $chan
}
on *:ban:#:{
  .ignore $bmask
  updatenl
}
on *:kick:#:{
  hinc Blacklist $+(Count,.,$knick))
  updatenl
}
alias blacklist {
  if $1 == add {
    var %a = 1, %b = $numtok($2-,44)
    while %a <= %b {
      .hadd -m Blacklist $gettok($2-,%a,44) $iif($3-,$3-,$$?="Blacklist Reason")
      inc %a
    }
  }
  elseif $1 == scan {
    if $me isop $2 {
      var %a = 1
      while %a <= $nick($2,0) {
        if $hget(Blacklist,$nick($2,%a)) {
          .ban -k $1 $nick($2,%a) 2 $hget(Blacklist,$nick($2,%a)) Kick $chr(35) $hget(Blacklist,$+(Count,.,$nick($2,%a)))
          dec %a
        }
        inc %a
      }
    }
  }
}
menu query {
  Blacklist Reason : .hadd -m Blacklist $nick $$?="Reason"
}
menu channel,nicklist,status {
  Blacklist
  .PM Spammer blacklist add $iif(!$snicks,$$?="Nick or nicks to be added",$snicks) PM Spammer
  .Flooder blacklist add $iif(!$snicks,$$?="Nick or nicks to be added",$snicks) Flooder
  .Custom : blacklist add $iif(!$snicks,$$?="Nick or nicks to be added",$snicks) $?="Common Reason"
  ; If common reason isn't included, you will be asked for a reason for each nick
}
menu channel,status {
  Blacklist
  .Remove : .hdel Blacklist $$?="Name to be removed"
}

  


I think I got everything you asked for, as well as some items you didn't ask for.

Last edited by RusselB; 01/10/06 09:57 PM.