| View previous topic :: View next topic |
| Author |
Message |
Mash Voice
Joined: 29 May 2004 Posts: 24
|
Posted: Tue Mar 01, 2005 10:17 am Post subject: join part and ban |
|
|
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 |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Tue Mar 01, 2005 10:23 am Post subject: |
|
|
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... |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Mar 01, 2005 3:41 pm Post subject: |
|
|
You can bind on part and check how long did nick stay in channel before parting:
| Code: | | if {[getchanjoin $nick $chan] >= [expr {[clock seconds]-3}]} { |
this detects if nick parted the channel after 3 or less seconds from joining. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Mar 02, 2005 8:18 am Post subject: |
|
|
| Code: | 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. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Mash Voice
Joined: 29 May 2004 Posts: 24
|
Posted: Thu Mar 03, 2005 2:02 am Post subject: |
|
|
Thanks It worked  |
|
| Back to top |
|
 |
|