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.

join part and ban

Old posts that have not been replied to for several years.
Locked
M
Mash
Voice
Posts: 24
Joined: Sat May 29, 2004 12:44 am

join part and ban

Post by Mash »

i need a script which auto-voices users on joining a particular chan and if a user joins and parts between 3 seconds it jus places a ban on his ip for 5 mins or so
can anyone write that code for me i jus know the code till autovoicein rest i dnno how to code.
thanks in advance.
Mash
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

i have done something similar in my anti-autorejoin script.
on join create a "bind part - $nick!$uhost trigger:bind" and create a timer like "utimer 3 [list remove:bind $nick!$uhost]". on part bind just ban him, in the timered action unbind whole thing from the person.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You can bind on part and check how long did nick stay in channel before parting:

Code: Select all

if {[getchanjoin $nick $chan] >= [expr {[clock seconds]-3}]} {
this detects if nick parted the channel after 3 or less seconds from joining.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind part - * ban:flyby

proc ban:flyby {nick uhost hand chan arg} {
if {[getchanjoin $nick $chan] >= [expr {[clock seconds]-3}]} {
putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
 }
}
This will ban nick if he joins and parts after 3 or less seconds.
Use it as a start and next time ask here not in private.
M
Mash
Voice
Posts: 24
Joined: Sat May 29, 2004 12:44 am

Post by Mash »

Thanks It worked :)
Locked