Swear Kick

By Heilos on May 29, 2005

This script will kick and ban any user who says a word in the text file swear.txt
Just add each word on a new line of the text file and you're all set ^_^

on *:INPUT:*:{
  if ($1 == !skon) { %st.swear = on | msg $chan Swear Kick is now On }
  if ($1 == !skoff) { unset %st.swear | msg $chan Swear Kick deactivated }
}

on *:TEXT:*:#:{
  if ((%st.swear == on) && ($nick !isop $chan)) {
    var %check = 1
      while (%check <= $lines(swear.txt)) {
        if ($read(swear.txt, %check) isin $1-) {
          mode $chan +b $wildsite
          kick $chan $nick PUT MESSAGE HERE
        }
        inc %check 1
      }
    }
  }
}

Comments

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

you could for the kb part do ban -ku600 $chan

 Respond  
guest598594   -  Nov 06, 2007

u went crazy w/ those brackets :P
i simplified it for ya, and added on @* (ur op), also u still inc after u kick, so why bother kicking the person when theyre already gone :)

on @*:TEXT:*:#:{
  if (%st.swear == on && $nick !isop $chan) {
    var %check = 1
    while ($read(swear.txt,%check)) {
    if ($v1 isin $1-) {
      mode $chan +b $wildsite
      kick $chan $nick Swear Detected: $qt($v1)
    }
    else inc %check
  }
}
 Respond  
Jackie   -  Apr 20, 2007

the god damn script dont work dick head

 Respond  
DarthReven   -  May 30, 2005

though you could loop threw the line of text and check if each token is a wild match in the text file which will make it run alittle faster

 Respond  
Yoinx   -  May 30, 2005

Text files are NOT the way to go for this type of script, as you have to loop through the entire file everytime someone talks in any channel you\'re in. Pretty slow, and causes constant hard drive useage. Use Hash Tables.

 Respond  
Rower   -  May 30, 2005

Plz try the script before you post it here

 Respond  
PoiXon   -  May 30, 2005

$st.swear i think you mean %st.swear :)

 Respond  
xDaeMoN   -  May 29, 2005

Add a check if you are an OP in the channel.

 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.