Word Kicker

By TravisT on Oct 17, 2009

Pick words or text strings to kick for. Performs wildcard searches on text and away events for words.

Away events use $1 for channel, grabs nickname from $rawmsg and text is $2-.
If your server doesn't support this syntax it won't work.

Adjustable ban time.

on *:start:{
  if (!%cuss_b) set %cuss_b 10
}
alias cuss {
  if ($1 = kick) {
    if ($me isop $2) { access $2 add deny $4 %cuss_b :SwearKick( $3 ) | kick $2-3 SwearKick }
  }
  elseif ($1 = -a) {
    hadd -m prot cuss $addtok($hget(prot,cuss),$2-,46)
    var %xe_ = $lines($qt($script))) - 1
    write $+(-il,%xe_) $qt($script) on $+(@*:text:*,$2-,*:#:,$chr(123)) cuss kick $!chan $!nick $!address $chr(125)
    .load -rs $qt($script)
  }
  elseif ($1 = -d) {
    hadd -m prot cuss $deltok($hget(prot,cuss),$2,46)
    write $+(-dw,*,$2,*) $qt($script)
    .load -rs $qt($script)
  }
}
alias pp_cuss {
  if ($gettok($hget(prot,cuss),$1,46)) return $iif($ifmatch !isnum,$ifmatch) :cuss -d $ifmatch
}
menu channel,status,menubar {
  -
  $iif($group(#swear) = on,$style(1)) Swear Kick
  .Turn $iif($group(#swear) = on,Off,On):{ $iif($group(#swear) = on,.disable,.enable) #swear }
  .-
  .Ban Length ( %cuss_b min. ):set %cuss_b $$?="Enter ban length in minutes."
  .-
  .Add Word:cuss -a $$?="Enter text string to kick for."
  .$iif($hget(prot,cuss),Del Word)
  ..$submenu($pp_cuss($1))
}
#swear off
raw 822:*:{
  if (%822c_ [ $+ [ $1 ] ] > 3) return
  inc -u2 %822c_ [ $+ [ $1 ] ]
  var %821_ni = $right($gettok($rawmsg,1,33),-1)
  if ($me isop $1) {
    var %cus_ = $numtok($hget(prot,cuss),46)
    while (%cus_) {
      if ($gettok($hget(prot,cuss),%cus_,46) isin $2-) cuss kick $1 %821_ni $address
      dec %cus_
    }
  }
}
;text events
#swear end

Comments

Sign in to comment.
TravisT   -  Oct 19, 2009

Hahah yeah I dont like cuss kickers, it was a request. Thanks

 Respond  
Dodge   -  Oct 18, 2009

Nice Code as always TravisT.
I believe In free speach, But Nice working Code.

 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.