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 

Flag except on idle-deop doesn't work.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Tue May 20, 2008 10:03 am    Post subject: Flag except on idle-deop doesn't work. Reply with quote

Code:
set list_of_chans "#chan1 #chan2"

global botnick nick

# interval in minutes between checks.
set check_interval  30

# allowed time in minutes for an op to be idle.
set op_allowed_time 30

# allowed time in minutes for a voiced user to be idle.
#set vo_allowed_time 10

# nicks to be exempted from Deop/devoice
set exclude_nicks "nick1;nick2;"

set exclude_nicks [string tolower $exclude_nicks]

proc inactive_checker { chan } {
        global exclude_nicks op_allowed_time  botnick
        if {![botisop $chan]} { return 0 }
        foreach user [chanlist $chan] {
        set user [string tolower $user]

        if {![string match "*$user;*" $exclude_nicks] && ![matchattr [nick2hand $user $chan] f]  } {
                        if {[isop $user $chan] && ![onchansplit $user $chan] && ($user != $botnick) && ([getchanidle $user $ch
an] >= $op_allowed_time)} {
                                        putserv "mode $chan -ok $user Idle.Op.SaP-Control"
                        }
                }
        }
}

proc run_checking_timer { } {
        global list_of_chans check_interval

        foreach check_chan [split $list_of_chans] {
                inactive_checker $check_chan
        }
        timer $check_interval run_checking_timer
}

timer $check_interval run_checking_timer

putlog "\[LOADED\] Inactive op/voice control - by SaPrOuZy."


This script should except the users that have +f flag, but it doesn't, only the nick except works, but I need the flag except too..
Please help, thanks in advance.

if {![string match "*$user;*" $exclude_nicks] && ![matchattr [nick2hand $user $chan] f] }
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Tue May 20, 2008 11:58 am    Post subject: Reply with quote

try changing
Code:
if {![string match "*$user;*" $exclude_nicks] && ![matchattr [nick2hand $user $chan] f]  }

to
Code:
if {![string match "*$user;*" $exclude_nicks] || ![matchattr [nick2hand $user $chan] f]  }
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Thu May 22, 2008 3:37 am    Post subject: Reply with quote

DragnLord wrote:
try changing
Code:
if {![string match "*$user;*" $exclude_nicks] && ![matchattr [nick2hand $user $chan] f]  }

to
Code:
if {![string match "*$user;*" $exclude_nicks] || ![matchattr [nick2hand $user $chan] f]  }


noop, it's not working.
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Thu May 22, 2008 6:13 am    Post subject: Reply with quote

try this code.

Code:

set list_of_chans "#chan1 #chan2"

global botnick nick

# interval in minutes between checks.
set check_interval  30

# allowed time in minutes for an op to be idle.
set op_allowed_time 30

# allowed time in minutes for a voiced user to be idle.
#set vo_allowed_time 10

# nicks to be exempted from Deop/devoice
set exclude_nicks "nick1;nick2;"

set exclude_nicks [string tolower $exclude_nicks]

proc inactive_checker { nick chan text } {
        global exclude_nicks op_allowed_time  botnick
        if {![botisop $chan]} { return 0 }
      set fnick [lindex $text 0]
      set userhand [nick2hand $fnick]
        foreach user [chanlist $chan] {
        set user [string tolower $user]

        if {![string match "*$user;*" $exclude_nicks] && ![matchattr $userhand o|o $chan] || [matchattr $userhand f|f $chan]} {
                        if {[isop $user $chan] && ![onchansplit $user $chan] && ($user != $botnick) && ([getchanidle $user $chan] >= $op_allowed_time)} {
                                        putserv "mode $chan -ok $user Idle.Op.SaP-Control"
                        }
                }
        }
}

proc run_checking_timer { } {
        global list_of_chans check_interval

        foreach check_chan [split $list_of_chans] {
                inactive_checker $check_chan
        }
        timer $check_interval run_checking_timer
}

timer $check_interval run_checking_timer

putlog "\[LOADED\] Inactive op/voice control - by SaPrOuZy."


i don't tested this code, but u tellme Smile
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Thu May 22, 2008 6:33 am    Post subject: Reply with quote

ok Nor7on, I'll try it.
Thanks Wink
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Thu May 22, 2008 6:41 am    Post subject: Reply with quote

[14:37] Tcl error in script for 'timer10907':
[14:37] wrong # args: should be "inactive_checker nick chan text"

?
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Thu May 22, 2008 9:27 am    Post subject: Reply with quote

so ? what's wrong in that code ?
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Thu May 22, 2008 9:37 am    Post subject: Reply with quote

Code:

set list_of_chans "#chan1 #chan2"

global botnick nick

# interval in minutes between checks.
set check_interval  30

# allowed time in minutes for an op to be idle.
set op_allowed_time 30

# allowed time in minutes for a voiced user to be idle.
#set vo_allowed_time 10

# nicks to be exempted from Deop/devoice
set exclude_nicks "nick1;nick2;"

set exclude_nicks [string tolower $exclude_nicks]

proc inactive_checker { chan } {
        global exclude_nicks op_allowed_time  botnick
        if {![botisop $chan]} { return 0 }
        foreach user [chanlist $chan] {
        set user [string tolower $user]
        set userhand [nick2hand $user]

        if {![string match "*$user;*" $exclude_nicks] && ![matchattr $userhand o|o $chan] || [matchattr $userhand f|f $chan]} {
                        if {[isop $user $chan] && ![onchansplit $user $chan] && ($user != $botnick) && ([getchanidle $user $chan] >= $op_allowed_time)} {
                                        putserv "mode $chan -ok $user Idle.Op.SaP-Control"
                        }
                }
        }
}

proc run_checking_timer { } {
        global list_of_chans check_interval

        foreach check_chan [split $list_of_chans] {
                inactive_checker $check_chan
        }
        timer $check_interval run_checking_timer
}

timer $check_interval run_checking_timer

putlog "\[LOADED\] Inactive op/voice control - by SaPrOuZy."


try.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Thu May 22, 2008 10:25 am    Post subject: Reply with quote

No, again, it's not working, not the bot deops even the except nicks !
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Thu May 22, 2008 11:10 am    Post subject: Reply with quote

change
Code:

if {![string match "*$user;*" $exclude_nicks] && ![matchattr $userhand o|o $chan] || [matchattr $userhand f|f $chan]} {


For
Code:

if {![string match "*$user;*" $exclude_nicks] || [matchattr $userhand f|f $chan]} {
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Fri May 23, 2008 2:37 am    Post subject: Reply with quote

Noop, it's not working, smb recommend a good idle-deop script psl!
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Fri May 23, 2008 5:52 am    Post subject: Reply with quote

Check this.

http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=620
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Fri May 23, 2008 7:57 am    Post subject: Reply with quote

Nor7on wrote:
Check this.

http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=620


I know this script, I've tested it already, The bot si deopind itself Smile

*** Bot sets mode: -oo Bot tester`
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Fri May 23, 2008 8:44 am    Post subject: Reply with quote

Code:

# Set this to a flag you want to be exempt from checks.
set IDLEOP(exempt) "E"


solution:
add ur bot to userlist and get flag +E.

try.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Fri May 23, 2008 10:46 am    Post subject: Reply with quote

-Bot- Sorry, but I can't adduser myself.
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 -> Scripting Help All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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