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.

Grab idle time, if ahead of it, ban.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Grab idle time, if ahead of it, ban.

Post by vigilant »

Anyone whose willing to help me with making this tcl?
It should simply, grab the idle time of a user, if it's more than 2 minutes, it kicks/bans them out of the channel. I want to be able to set channel flags, like if the channel is, +antiidle it detects if not, then nothing.
Thanks 8)
Anser Quraishi
Website: http://www.anserq.com
C
Callisto
Halfop
Posts: 86
Joined: Sun Mar 13, 2005 11:04 am

Re: Grab idle time, if ahead of it, ban.

Post by Callisto »

vigilante wrote:Anyone whose willing to help me with making this tcl?
It should simply, grab the idle time of a user, if it's more than 2 minutes, it kicks/bans them out of the channel. I want to be able to set channel flags, like if the channel is, +antiidle it detects if not, then nothing.
Thanks 8)
Does this do what you want?
http://www.egghelp.org/cgi-bin/tcl_arch ... oad&id=862
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Post by vigilant »

It doesn't work! :lol:
Anser Quraishi
Website: http://www.anserq.com
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

vigilante wrote:It doesn't work! :lol:
.. and that really says a lot doesn't it?

Paste the result of '.set errorInfo'.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Post by vigilant »

Simply nothing is being done.. it ignores everything i suppose, no error info :S
Anser Quraishi
Website: http://www.anserq.com
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Worked for me when I tested it. Try reading the documentation for it.
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Post by vigilant »

EVen did that
Anser Quraishi
Website: http://www.anserq.com
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

vigilante wrote:EVen did that
Doubtful.
# - Using -
# Type in partyline:
# .chanset #channel maxidle <time in minutes>
# If set 0 channel's check will be ignored.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

vigilante wrote:EVen did that
Did you do as instructed? chanset, configured, etc..

# Punishing method (1 = Kick, 2 = Kick/Ban)
set pmethod 1
# Ban time in minutes.
set bantime 1
# Kick's reason
set aidlereason "E` vietato sostare per piu` di %idletime minuti nel canale."
# Exception's flags
set flags f|f
# Kick op? (0 = Yes, 1 = No)
set kickop 1
# Kick voice? (0 = Yes, 1 = No)
set kickvoice 1



I noticed the script does not trigger on the 1st scan, but does on subsequent scans. In any event, you could always put some "putcmdlog" lines into the script to show that it is in fact working:

Code: Select all

proc aidle:checkidle { min hour day month year } {
global botnick flags kickop kickvoice
        putcmdlog "aidle check running.."
        foreach chan [channels] {
                if {![channel get $chan "maxidle"]} {continue}
                foreach nick [chanlist $chan] {
                        if {$nick == $botnick} {continue}
                        if {([isop $nick $chan]) && ($kickop)} {continue}
                        if {([isvoice $nick $chan]) && ($kickvoice)} {continue}
                        if {[matchattr [nick2hand $nick] $flags] == 1} {continue}
                        if {[getchanidle $nick $chan] > [channel get $chan "maxidle"]} {
                        putcmdlog "aidle kicking $nick on $chan - idle [channel get $chan "maxidle"]"
                        aidle:punish $chan $nick [channel get $chan "maxidle"]
                        }
                }

        }
}
#########################################################################################################
If it still doesn't work, then I dunno what to tell ya. BTW, there's an idle-kick option for channels built into eggdrop. Try .help chaninfo and read about idle-kick, and read .help chanset.
C
Callisto
Halfop
Posts: 86
Joined: Sun Mar 13, 2005 11:04 am

Post by Callisto »

I hate to admit this but works just great here it is why I suggested it. Maybe more info so these good people can diagnose your problem ?
Good luck
e
edu
Voice
Posts: 31
Joined: Sun Oct 29, 2006 2:10 pm

Post by edu »

Try: .chanset <#channel> +maxidle <time>
Seek the truth
Post Reply