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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Zircon
Op
Posts: 191 Joined: Mon Aug 21, 2006 4:22 am
Location: Montreal
Post
by Zircon » Fri Jun 29, 2007 8:29 pm
Hi all
I d like to request a script that can punish some1 that abuse of slaps like these :
[10:50] Action: FreeStiliste slaps Goldquizz around a bit with a large trout
[10:50] Action: FreeStiliste slaps Anti-Flood around a bit with a large trout
It s very annoying. Unfortunately i cant use text protection, coz i run a quizz channel and players usualy lags and i dont want the bot to punish them. So i d like a script that let me specify how many slaps in how many seconds that trigger the punishment.
Thanks in advance
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Fri Jun 29, 2007 9:50 pm
Code: Select all
# kick after x slaps in y seconds
set slaplimit 3:10
bind ctcp - ACTION slap:prot
proc slap:prot {nick uhost hand chan kw arg} {
if {![validchan $chan]||[matchattr $hand +fmo|+fmo $chan]} {return 0}
foreach {o s} [split $::slaplimit :] {break}
if {[string match -nocase "slaps *" $arg]&&[fld:slap $uhost:$chan $s $o]} {
putserv "kick $chan $nick :Slap attack detected!"
pushmode $chan +b *!*@[lindex [split $uhost @] 1]
}
}
proc fld:slap {id s o} {
global slappers
if {![info exists slappers($id)]} {
set slappers($id) 0
utimer $s [list unset slappers($id)]
}
expr {[incr slappers($id)] >= $o}
}
Edit: Fixed typo
Edit2: Fixed kick bug and added +fmo exempt.
Last edited by
Sir_Fz on Sat Jun 30, 2007 7:20 pm, edited 2 times in total.
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Sat Jun 30, 2007 12:41 pm
Sir_Fz there is a typo in your post
fld:slp -> fld:slap
r0t3n @ #r0t3n @ Quakenet
Zircon
Op
Posts: 191 Joined: Mon Aug 21, 2006 4:22 am
Location: Montreal
Post
by Zircon » Sat Jun 30, 2007 4:17 pm
Thanks a lot Sir_Fz, ur script works fine, i just did a little of editing to replace kick $nick $chan by kick $chan $nick , so the Kick can be effetive, and also used putquick instead of putserv and pushmode, so it can react faster.
I have a request. Is it possible to make this script exempt users that have +f or +m or +o flags ?
Thanks in advance
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Jun 30, 2007 7:21 pm
Try the edited version.
Zircon
Op
Posts: 191 Joined: Mon Aug 21, 2006 4:22 am
Location: Montreal
Post
by Zircon » Mon Jul 02, 2007 12:30 am
Hello Sir_Fz
Ur script is just working PERFECT. Thanks vey much
Sydneybabe
Op
Posts: 106 Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines
Post
by Sydneybabe » Wed Oct 31, 2007 7:01 am
how about exempting Operator(@) on kickban sir Sir_Fz.. thanks in advance
Zircon
Op
Posts: 191 Joined: Mon Aug 21, 2006 4:22 am
Location: Montreal
Post
by Zircon » Wed Oct 31, 2007 11:39 am
They are already exempted if they have the +o flag on the bot.
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Wed Oct 31, 2007 7:32 pm
It appears one makes an effort to search the
Tcl Archive these days.
There are
five anti trout slap scripts there.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM