This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

help pls

Old posts that have not been replied to for several years.
Locked
R
Rob
Voice
Posts: 25
Joined: Thu Aug 01, 2002 1:21 pm

help pls

Post by Rob »

ive just downloaded Anti Trout Slap v1.1 By Dude but noticed it bans anyone who does the trout slap. can it be modified to only ban non-opped users, so others like voice and non-voice/opped users will get punished for using trout slaps.

Code: Select all

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 Trout Slap v1.1 By Dude \002Loaded...\002"
Any help would be great.

Rob.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

if {[isop $nick $dest]} {return 0}
R
Rob
Voice
Posts: 25
Joined: Thu Aug 01, 2002 1:21 pm

Post by Rob »

Sir_Fz wrote:if {[isop $nick $dest]} {return 0}
and i would put that where?

sorry i aint too familar with tcl.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

under

Code: Select all

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 } {
R
Rob
Voice
Posts: 25
Joined: Thu Aug 01, 2002 1:21 pm

Post by Rob »

it still bans ops :(
Locked