Swear Kicker (Curse Kicker)

By TwistedHumor on Sep 29, 2008

Works for mirc 6.1 or above

;Swear Kicker(Curse Kicker)

/swear -a - to add to the list of swear words.
/swear -d - to remove from the list of swear words.
/swear -c - to clear the list of swear words.

alias swear {
  if !$isid {
    if $1 == -a { set %swear.list $addtok(%swear.list,$2,32) }
    elseif $1 == -d { set %swear.list $deltok(%swear.list,$findtok(%swear.list,$2,1,32),32) }
    elseif $1 == -c { unset %swear.list }
  }
  else { return %swear.list }
}
on *:text:*:#:{
  if $istok($swear,$1-,32) { kick $chan $nick no swearing thanks. }
}

Comments

Sign in to comment.
miniCruzer   -  Aug 19, 2009

I like it. I'd add a ban after they are kicked x amount of times

 Respond  
~Sonny   -  Oct 02, 2008

ROFL @ dodger.

 Respond  
Bullet_Dodger   -  Sep 30, 2008

Good Script
{{6/10}}

 Respond  
Imrac   -  Sep 29, 2008

You can use the chr 161 for a addtok and then if ($regex($1-,$+(\b(,%swearlist,)\b))) { do w/e you want do it }

 Respond  
TwistedHumor   -  Sep 29, 2008

Thanx for your comments...
Didn't realize the ! was there.
Yes you can use a loop if you want.
Gotta keep some coding simple for others.

 Respond  
guest598594   -  Sep 29, 2008

Use a loop:

var %x = 1
while $gettok(%swear.list,%x,32) {
  if ($istok($1-,$v1,32)) kick $chan $nick no swearing
  else inc %x
}
 Respond  
napa182   -  Sep 29, 2008

well it only triggers if the bad word is the only word said...
and you dont need the ! on ur text event cuz you cant set off ur on text events

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.