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!
BIF
Voice
Posts: 12 Joined: Mon Jul 31, 2006 4:53 pm
Post
by BIF » Sat Apr 28, 2007 10:54 pm
I need a script that will kick/ban a user for using a command " !stop "
in public chat
I would like for it to kick/ban the user on the 2nd " !stop " if its within a 15 minutes of the last time. it has to be per user. as in if 1 person does it and then someone else it wont kick .. but only if its the same *!*@IP
The ban should last 1440 minutes or 24 hours.
i have tried many different ways to get this to work, and i keep falling short. any help on this matter would greatly be appreciated thank you in advanced
YooHoo
Owner
Posts: 939 Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast
Post
by YooHoo » Sun Apr 29, 2007 2:02 pm
use an existing "bad word" script, and modify it accordingly.
bad word scripts
BIF
Voice
Posts: 12 Joined: Mon Jul 31, 2006 4:53 pm
Post
by BIF » Sun Apr 29, 2007 2:32 pm
been there tryed that.. everything kicks after 1 " bad word " im looking for a kick ban after 2 words within 15 minutes
iamdeath
Master
Posts: 323 Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:
Post
by iamdeath » Sun Apr 29, 2007 4:42 pm
I aint clear about what you want, I mean do you want a script to ban a user who types !stop 2 times within 15 minutes and the bot should ban him for 24 hours. If he types !stop onces the bot will do nothing right?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Apr 29, 2007 6:04 pm
Code: Select all
bind pub - !stop ban:stop
proc ban:stop {nick uhost hand chan arg} {
if {[throttled [lindex [split $uhost @] 1] 900]} {
putkick $chan $nick "!stop command abusement."
newchanban $chan *!*@[lindex [split $uhost @] 1] !stop-abuse "!stop command abusement." 1440
}
}
# user's throttled proc
proc throttled {id time} {
global throttled
if {[info exists throttled($id)]} {
return 1
} {
set throttled($id) [clock sec]
utimer $time [list unset throttled($id)]
return 0
}
}
BIF
Voice
Posts: 12 Joined: Mon Jul 31, 2006 4:53 pm
Post
by BIF » Sun Apr 29, 2007 9:04 pm
Thanks alot for that.. and yes iamdeath Thats extactly what i want
BIF
Voice
Posts: 12 Joined: Mon Jul 31, 2006 4:53 pm
Post
by BIF » Sun Apr 29, 2007 9:29 pm
Sir_Fz wrote: Code: Select all
bind pub - !stop ban:stop
proc ban:stop {nick uhost hand chan arg} {
if {[throttled [lindex [split $uhost @] 1] 900]} {
putkick $chan $nick "!stop command abusement."
newchanban $chan *!*@[lindex [split $uhost @] 1] !stop-abuse "!stop command abusement." 1440
}
}
# user's throttled proc
proc throttled {id time} {
global throttled
if {[info exists throttled($id)]} {
return 1
} {
set throttled($id) [clock sec]
utimer $time [list unset throttled($id)]
return 0
}
}
Just Tested this.. Works Flawlessly .. How would i go about setting it not to kick +f or ops ?
YooHoo
Owner
Posts: 939 Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast
Post
by YooHoo » Sun Apr 29, 2007 10:11 pm
BIF wrote: Just Tested this.. Works Flawlessly .. How would i go about setting it not to kick +f or ops ?
use another if statement, utilizing
matchattr
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Apr 30, 2007 12:11 pm
You can add this line in the ban:stop proc:
Code: Select all
if {[matchattr $hand f|f $chan]} {return 0}