| View previous topic :: View next topic |
| Author |
Message |
eXtremer Op
Joined: 07 May 2008 Posts: 138
|
Posted: Tue May 20, 2008 10:03 am Post subject: Flag except on idle-deop doesn't work. |
|
|
| 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 |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Tue May 20, 2008 11:58 am Post subject: |
|
|
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 |
|
 |
eXtremer Op
Joined: 07 May 2008 Posts: 138
|
Posted: Thu May 22, 2008 3:37 am Post subject: |
|
|
| 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 |
|
 |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Thu May 22, 2008 6:13 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
eXtremer Op
Joined: 07 May 2008 Posts: 138
|
Posted: Thu May 22, 2008 6:33 am Post subject: |
|
|
ok Nor7on, I'll try it.
Thanks  |
|
| Back to top |
|
 |
eXtremer Op
Joined: 07 May 2008 Posts: 138
|
Posted: Thu May 22, 2008 6:41 am Post subject: |
|
|
[14:37] Tcl error in script for 'timer10907':
[14:37] wrong # args: should be "inactive_checker nick chan text"
? |
|
| Back to top |
|
 |
eXtremer Op
Joined: 07 May 2008 Posts: 138
|
Posted: Thu May 22, 2008 9:27 am Post subject: |
|
|
| so ? what's wrong in that code ? |
|
| Back to top |
|
 |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Thu May 22, 2008 9:37 am Post subject: |
|
|
| 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 |
|
 |
eXtremer Op
Joined: 07 May 2008 Posts: 138
|
Posted: Thu May 22, 2008 10:25 am Post subject: |
|
|
| No, again, it's not working, not the bot deops even the except nicks ! |
|
| Back to top |
|
 |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Thu May 22, 2008 11:10 am Post subject: |
|
|
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 |
|
 |
eXtremer Op
Joined: 07 May 2008 Posts: 138
|
Posted: Fri May 23, 2008 2:37 am Post subject: |
|
|
| Noop, it's not working, smb recommend a good idle-deop script psl! |
|
| Back to top |
|
 |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
|
| Back to top |
|
 |
eXtremer Op
Joined: 07 May 2008 Posts: 138
|
Posted: Fri May 23, 2008 7:57 am Post subject: |
|
|
I know this script, I've tested it already, The bot si deopind itself
*** Bot sets mode: -oo Bot tester` |
|
| Back to top |
|
 |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Fri May 23, 2008 8:44 am Post subject: |
|
|
| 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 |
|
 |
eXtremer Op
Joined: 07 May 2008 Posts: 138
|
Posted: Fri May 23, 2008 10:46 am Post subject: |
|
|
| -Bot- Sorry, but I can't adduser myself. |
|
| Back to top |
|
 |
|