Give this a shot.

You will have to test it...

Let me know what errors you get, we will go from there.


Code:

on *:start:{
  if !$hget(BadWords) { .hmake BadWords 10 }
  if $exists(BadWords.hsh) { .hload BadWords BadWords.hsh }
}
on *:exit:{
  .hsave -o BadWords BadWords.hsh
}
on *:disconnect:{
  .hsave -o BadWords BadWords.hsh
}

menu menubar {
  -
  Private Offensive Message                      
  .Turn $iif($hget(BadWords,0),Off,On) : .hadd -m BadWords 0 $iif($hget(BadWords,0),$false,$true)
  .-
  .Add a word : .hadd -m BadWords $$?="Bad Word to be added" $true
  .-
  .Remove a word : .hdel BadWords $$?="Bad Word to be removed"
  .-
  .List Spam Words : .bad_words_list
  .-
}
alias -l bad_words_list {
  var %a = 1, %b = $hget(BadWords,0).item
  unset %badwords
  while %a <= %b {
    set %badwords $addtok(%badwords,$hget(BadWords,%a).item,32)
    if ($calc($numtok(%badwords,32) + $len(%badwords)) > 900) {
      echo -a $replace(%badwords,$chr(32),$+($chr(44),$chr(32)))
      unset %badwords
    }
    inc %a
  }
  if %badwords {
    echo -a $replace(%badwords,$chr(32),$+($chr(44),$chr(32)))
    unset %badwords
  }
}
on *:open:?:{
  if ($ulevel != op) && ($hget(BadWords,0)) {
    var %cnt = 1
    while (%cnt <= $hget(BadWords,0).item) {
      if ($hget(BadWords,%cnt).item isin $1-) {
        close -m $nick
        .timer. $+ $nick 1 1 spamdetect $nick
        halt
      }
      inc %cnt      
    }
  }
}

on ^*:notice:*:?: {
  var %oknames = ChanServ NickServ MemoServ
  if ($nick !isin %oknames) && ($hget(BadWords,0)) {
    var %cnt = 1
    while (%cnt <= $hget(BadWords,0).item) {
      if ($hget(BadWords,%cnt).item isin $1-) {
        .timer. $+ $nick 1 1 spamdetect $nick
        halt
      }
      inc %cnt 
    }
  }
}


alias spamdetect {
  var %a = $comchan($1,0).op
  while (%a > 0) {
    ban -ku3600 $comchan($1,%a).op $1 2 14Private Offensive Language 
  }
  dec %a
}  
 


Copy and paste the whole thing, i did change the spamdetect alias a little... its on a timer now, so it wont crash your mIRC.

Ill try to watch the board later on, I have some calculus homework to attend to


Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)