You can also do
Code:
if ($nick(#,$nick,rv)) {
so that this script only gets triggered for voiced and regular users. If you want to exclude the voiced, just remove the letter v. Then if that's to mainly address the regular user, a positive approach would become: $nick isreg $chan

Anyway, this
Quote:
if ($nick !isop #) {
if (!$hget(swear)) hmake swear 10
Can just be:
Code:
if ($nick !isop #) && (!$hget(swear)) {
 hmake swear 10
saves yourself a if and a bracket.

The whole script, as a matter of fact, can just be:
Code:
On *:Text:*:#channel: { swear $1- }
On *:Action:*:#channel: { swear $1- }
alias -l swear {
  if ($nick !isop #) && (!$hget(swear)) hmake swear 10
  var %swr = 1
  while ($gettok($swear,%swr,32)) {
    if ($+(*,$gettok($swear,%swr,32),*) iswm $strip($1-)) {
      hinc swear $nick
      var %swear = $gettok($swear,%swr,32)
      if ($hget(swear,$nick) == 1) do something here
      if ($hget(swear,$nick) == 3) .do something here
    }
    inc %swr
  }
}