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.

Prevent auto rejoin.

Old posts that have not been replied to for several years.
Locked
k
kebabdjuret
Voice
Posts: 26
Joined: Sat Feb 09, 2002 8:00 pm
Location: Sweden
Contact:

Prevent auto rejoin.

Post by kebabdjuret »

Hi!

I'm looking for a script that bans people with auto rejoin for some time. (10 minutes maybe?)

If i kick them I want them to stay out for a while ;)

Thanks.

Fredrik
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

heh..
just ban them for 10 mins ;)

or you could try searching in the tcl-archive at www.egghelp.org
Elen sila lúmenn' omentielvo
k
kebabdjuret
Voice
Posts: 26
Joined: Sat Feb 09, 2002 8:00 pm
Location: Sweden
Contact:

Post by kebabdjuret »

Papillon wrote:or you could try searching in the tcl-archive at www.egghelp.org
Been there, done that.

Can't find anyting.
k
kebabdjuret
Voice
Posts: 26
Joined: Sat Feb 09, 2002 8:00 pm
Location: Sweden
Contact:

Post by kebabdjuret »

Code: Select all

set rejoinTime "5"
set banTime "10"

global kick rejoinTime banTime
        
bind kick - * storeKick
bind join - * checkJoin
 
proc storeKick {nick host hand chan target reason} {
        global kick rejoinTime banTime
        set kick($target)($chan) 1
        putlog "$target kicked from $chan"
        utimer $rejoinTime "removeKick $target $chan"
}

proc checkJoin {nick host hand chan} {
        global kick rejoinTime banTime
        if {[info exists kick($nick)($chan)]} {
                unset kick($nick)($chan)
                putlog "kick($nick)($chan) removed"
                putserv "MODE $chan +b $nick!$host"
                putserv "KICK $chan $nick :Auto rejoin is bad. $banTime min temp ban"
                timer $banTime "removeBan $chan $nick $host"
        }
}

proc removeKick {t c} {
        global kick rejoinTime banTime
        if {[info exists kick($t)($c)]} {
                unset kick($t)($c)
                putlog "kick($t)($c) removed"
        }
}

proc removeBan {c n h} {
        global kick rejoinTime banTime
        putserv "MODE $c -b $n!$h"
        putlog "Ban on $n!$h removed."
}
My putserv "MODE $chan +b $nick!$host" and putserv "KICK $chan $nick :Auto rejoin is bad. $banTime min temp ban" doesn't work. Any idea?

(This is my first script.)
Last edited by kebabdjuret on Wed Apr 30, 2003 12:33 am, edited 1 time in total.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

putlog "kick($nick)($chan) removed"
Are you seeing the output from this on the partyline?

WHile I havn't tested it, I don't think you can use arrays in this way
k
kebabdjuret
Voice
Posts: 26
Joined: Sat Feb 09, 2002 8:00 pm
Location: Sweden
Contact:

Post by kebabdjuret »

ppslim wrote:Are you seeing the output from this on the partyline?

WHile I havn't tested it, I don't think you can use arrays in this way
The array is fine. The problem was.. uhm, the bot wasn't op. :P
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

"set a(b)(c) value" creates a element in "a" called "b)(c"
- it looks bad, but it works :)
k
kebabdjuret
Voice
Posts: 26
Joined: Sat Feb 09, 2002 8:00 pm
Location: Sweden
Contact:

Post by kebabdjuret »

user wrote:"set a(b)(c) value" creates a element in "a" called "b)(c"
- it looks bad, but it works :)
Really?

Haha, not very nice. :P
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Especially when you want to use the value... ${a(b)(c)}
Locked