Jump to content
chain

TCL Anti Trout Slap

Recommended Posts

  • Administrators
Posted
# Anti Trout Slap v1.1 By Dude

# Kick method
# 0 = Kick the user who slaps bot
# 1 = Kick the user who slaps anybody
# 2 = Kickban the user who slaps bot
# 3 = Kickban the user who slaps anybody
set troutkickmethod 0

set troutkickreason "Reason here!"

# BAN Time
set troutbantime 120

bind ctcp - ACTION antitrout:ctcp:action

proc antitrout:ctcp:action {nick uhost hand dest keyword arg} {
 global botnick troutkickmethod troutkickreason troutbantime
 if { [validchan $dest] == 1 && ([string tolower [lindex $arg 0]] == "slaps" || [string tolower [lindex $arg 0]] == "slap") && [lsearch [string tolower $arg] trout] >= 2 && [string tolower $nick] != [string tolower $botnick] && [botisop $dest] == 1 } {
  if { $troutkickmethod == 0 && [string tolower [lindex $arg 1]] == [string tolower $botnick] } {
   putserv "kick $dest $nick :$troutkickreason"
  }
  if { $troutkickmethod == 1 } {
   putserv "kick $dest $nick :$troutkickreason"
  }
  if { $troutkickmethod == 2 && [string tolower [lindex $arg 1]] == [string tolower $botnick] } {
   scan [string tolower [getchanhost $nick $dest]] "%\[^@]@%s" host host
   newchanban $dest *!*@$host $botnick "$troutkickreason" $troutbantime
  }
  if { $troutkickmethod == 3 } {
   scan [string tolower [getchanhost $nick $dest]] "%\[^@]@%s" host host
   newchanban $dest *!*@$host $botnick "$troutkickreason" $troutbantime
  }
 }
 return 0
}
putlog "Anti-Slap loaded!"

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...