Code:
alias badword {
  if (!$1) {
    if ($group(#badword) == on) {
      .disable #badword
      echo -ac info * Bad word kicker has been disabled
    }
    else {
      .enable #badword
      echo -ac info * Bad word kicker has been enabled
    }
  }
  if ($1 == -a) {
    hadd -m badword $2 1
    echo -ac info * $2 has been added to the bad word list
  }
  if ($hget(badword,$2)) {
    if ($1 == -d) {
      hdel badword $2
      echo -ac info * $2 has been deleted from the bad word list
    }
    if ($1 == -r) {
      hfree badword
      echo -ac info * Bad word list has been cleared
    }
    if ($1 == -l) {
      echo -ac info * Bad words list:
      var %x = 1
      while ($hget(badword,%x).item) {
        echo -ac info $v1
        inc %x
      }
    }
  }
}
on *:START: {
  if ($hget(badword)) { hfree badword }
  hmake badword
  if ($isfile(badword.hsh)) { hload -b badword badword.hsh }
}
on *:UNLOAD: {
  if ($hget(badword)) {
    hsave -bo badword badword.hsh
    hfree badword
  }
}
on *:EXIT: {
  if ($hget(badword)) {
    hsave -bo badword badword.hsh
  }
}
#badword off
on @*:TEXT:*:#: {
  if ($hget(badword)) {
    while ($0) {
      if ($hget(badword,$1)) {
        kick # $nick Please do not say bad words in here.
        break
      }
      tokenize 32 $2-
    }
  }
}
on @*:ACTION:*:#: {
  if ($hget(badword)) {
    while ($0) {
      if ($hget(badword,$1)) {
        kick # $nick Please do not say bad words in here.
        break
      }
      tokenize 32 $2-
    }
  }
}
on @*:NOTICE:*:#: {
  if ($hget(badword)) {
    while ($0) {
      if ($hget(badword,$1)) {
        kick # $nick Please do not say bad words in here.
        break
      }
      tokenize 32 $2-
    }
  }
}
#badword end

Syntax: /badword [-adrl] <on|off|badword>

I think this will work. :tongue: