Swear kicker

By simplicity on Sep 14, 2007

This snippet comes fully configurable and easy to use. You can edit the words in the snippet itself and edit the number of counts with the %x variable. This checks to see how many times the word is said until the user is banned. The snippet also checks events such as on part and on quit to make sure that the variables for a nick is unset.

; Swear kicker
; by simplicity  

on @*:text:*:#:{ 
  var %swear = shit,fuck
  if ($strip($1-,$gettok(%swear,1-,44))) {
    var %x = 3
    var %y = 1
    inc %swear.num. [ $+ [ $nick ] ] 
    while (%swear.num. [ $+ [ $nick ] ] isnum %y) { 
      msg $chan $+($nick,:) Do not swear in $+($chan,$chr(46)) Any more of this conduct and you will be banned.
      halt
    }
    while (%swear.num. [ $+ [ $nick ] ] iswm %x) {
      unset %swear.num. [ $+ [ $nick ] ]
      ban -k # $nick You have been banned for swearing. 
    }
  }
}   

on *:part:#:{ 
  if ($gettok(%swear.num. [ $+ [ $nick ] ],1-,44)) { unset %swear.num. [ $+ [ $nick ] ] }
}

on *:quit:{ 
  if ($gettok(%swear.num. [ $+ [ $nick ] ],1-,44)) { unset %swear.num. [ $+ [ $nick ] ] }
}

Comments

Sign in to comment.
a careful warchild   -  Aug 23, 2008

actually no, this bans people for not even swearing.

 Respond  
a careful warchild   -  Aug 23, 2008

Good Job, been trying to script one like this actually, thanks for uploading.

 Respond  
SilentExile   -  Sep 16, 2007

Coding is fairly simple, and there are a couple things that can be improved on. Try making the $nick a $wildsite. What if the nick changed nicks? He could evade your kicker. Make the $strip($1-) an $istok so that it doesn\'t retrieve the word from another word that has been combined. And you do not need the %y variable. That could be simply a while (%variable <= %x)

What about if you exit? Everything would still be saved. Add an on :exit event to unset the variables. ( unset %swear.num. )

 Respond  
simplicity   -  Sep 15, 2007

thx d00d3!1!~

 Respond  
cantseeme   -  Sep 15, 2007

wat an ereet skript!!1

wtg d0de

 Respond  
Abbas   -  Sep 15, 2007

Good Job

 Respond  
simplicity   -  Sep 14, 2007

Thank you dataprofile.

 Respond  
dataprofile   -  Sep 14, 2007

Gj.

 Respond  
simplicity   -  Sep 14, 2007

Thank you M[n]M.

 Respond  
M[n]M   -  Sep 14, 2007

nice job!

 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.