egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

join part and ban

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Mash
Voice


Joined: 29 May 2004
Posts: 24

PostPosted: Tue Mar 01, 2005 10:17 am    Post subject: join part and ban Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Tue Mar 01, 2005 10:23 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Mar 01, 2005 3:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Mar 02, 2005 8:18 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Mash
Voice


Joined: 29 May 2004
Posts: 24

PostPosted: Thu Mar 03, 2005 2:02 am    Post subject: Reply with quote

Thanks It worked Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber