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 = ban

Old posts that have not been replied to for several years.
Locked
j
jkimbro
Voice
Posts: 1
Joined: Mon Mar 14, 2005 11:19 pm

join/part = ban

Post by jkimbro »

If a user joins, then parts within a certain timespan, such as 5 seconds, could I get a script that would do the following command
/msg chanserv #channel tempban (join/parter) 10m

Thanks.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

bind part - * foo
proc foo {n u h c m} {
  if [matchattr $h of|of] return ;# dont mess with ops/friends
  if {[getchanjoin $n $c] + 5 >= [unixtime]} {
    putserv "privmsg chanserv :$c tempban [maskhost $n!$u] 10m"
  }
}
Last edited by demond on Mon Mar 14, 2005 11:38 pm, edited 1 time in total.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

This script is taken from this thread:
http://forum.egghelp.org/viewtopic.php?t=9248

Code: Select all

bind part - "*" ban:flyby

proc ban:flyby {nick uhost hand chan arg} {
 if {[getchanjoin $nick $chan] >= [expr {[clock seconds]-5}]} {
  putserv "privmsg chanserv :$chan tempban (join/parter) 10m"
  }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

awyeah, i'm assuming, with (join/parter) he meant the host. Not exactly what he said.

So demond would have the solution :p
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

That's not my problem, that's his problem. :lol:

Coincidence we both posted at the same hour, within the same minute. He should have specified a host format, in which he would like to ban the user, as there are 500 different ways of doing it.

Different IRC Services have different ChanServ command line options for users. In my case I've come across this TEMPBAN command the first time.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I see that [unixtime] or [clock seconds] is the same thing. So basicly the 2 given codes are the same, either subtract from the unixtime or add to the getchanjoin.
Locked