Code:
elseif $1 == !bwdel {
  if !$2 {
    .msg $chan Usage: !bwdel <list of bad words to be deleted, space or comma separated)    
  }
  else {
    tokenize 32 $2-
    var %a = $0
    while %a {
      if ($hfind(Badwords,$($+($,%a),2),1).data) { 
         msg $chan $($+($,%a),2) deleted from bad word list
        .hdel Badwords $v1
      }
      dec %a
    }
  }
  .hsave -n Badwords Badwords.txt
}