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 

Grab idle time, if ahead of it, ban.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
vigilant
Halfop


Joined: 05 Jan 2006
Posts: 48

PostPosted: Sun Feb 25, 2007 4:24 pm    Post subject: Grab idle time, if ahead of it, ban. Reply with quote

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 Cool
_________________
Anser Quraishi
Website: http://www.anserq.com
Back to top
View user's profile Send private message
Callisto
Halfop


Joined: 13 Mar 2005
Posts: 86

PostPosted: Sun Feb 25, 2007 7:19 pm    Post subject: Re: Grab idle time, if ahead of it, ban. Reply with quote

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 Cool


Does this do what you want?
http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=862
Back to top
View user's profile Send private message
vigilant
Halfop


Joined: 05 Jan 2006
Posts: 48

PostPosted: Sun Feb 25, 2007 8:15 pm    Post subject: Reply with quote

It doesn't work! Laughing
_________________
Anser Quraishi
Website: http://www.anserq.com
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun Feb 25, 2007 8:18 pm    Post subject: Reply with quote

vigilante wrote:
It doesn't work! Laughing

.. 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
Back to top
View user's profile Send private message Visit poster's website
vigilant
Halfop


Joined: 05 Jan 2006
Posts: 48

PostPosted: Sun Feb 25, 2007 8:23 pm    Post subject: Reply with quote

Simply nothing is being done.. it ignores everything i suppose, no error info :S
_________________
Anser Quraishi
Website: http://www.anserq.com
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Feb 25, 2007 8:54 pm    Post subject: Reply with quote

Worked for me when I tested it. Try reading the documentation for it.
Back to top
View user's profile Send private message
vigilant
Halfop


Joined: 05 Jan 2006
Posts: 48

PostPosted: Sun Feb 25, 2007 11:38 pm    Post subject: Reply with quote

EVen did that
_________________
Anser Quraishi
Website: http://www.anserq.com
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Feb 26, 2007 12:06 am    Post subject: Reply with quote

vigilante wrote:
EVen did that

Doubtful.

Quote:
# - 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
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Feb 26, 2007 1:18 am    Post subject: Reply with quote

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:

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.
Back to top
View user's profile Send private message
Callisto
Halfop


Joined: 13 Mar 2005
Posts: 86

PostPosted: Mon Feb 26, 2007 3:26 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
edu
Voice


Joined: 29 Oct 2006
Posts: 31

PostPosted: Thu Mar 01, 2007 1:50 pm    Post subject: Reply with quote

Try: .chanset <#channel> +maxidle <time>
_________________
Seek the truth
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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