| View previous topic :: View next topic |
| Author |
Message |
F|irT Voice
Joined: 30 Apr 2015 Posts: 30 Location: Pakistan
|
Posted: Sat Jul 15, 2017 12:58 am Post subject: Bugs on tcl |
|
|
| Code: |
set list_of_chans "#chan1 #chan2"
global botnick username
# interval in minutes between checks.
set check_interval 5
# allowed time in minutes for an op to be idle.
set op_allowed_time 45
# 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;nick3;"
set exclude_nicks [string tolower $exclude_nicks]
proc inactive_checker { chan } {
global exclude_nicks op_allowed_time vo_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 {[isvoice $user $chan] && ![onchansplit $user $chan] && ($user != $botnick) &&([getchanidle $user $chan] >= $vo_allowed_time)} {
putserv "mode $chan -vk $user Idle.Devoice"
}
if {[isop $user $chan] && ![onchansplit $user $chan] && ($user != $botnick) && ([getchanidle $user $chan] >= $op_allowed_time)} {
putserv "mode $chan -ok $user Idle.Op"
}
}
}
}
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
|
i found this tcl but this is not proper working .. i got this result when i apply on bot.. [07:49] * NoNSt0p sets mode: -ok NoNSt0p Idle.Op . but deop him/self but not other's . can any one corret me for this
| Code: |
# nicks to be exempted from Deop
set exclude_nicks "nick1;nick2;nick3;"
# nicks to be exempted from devoice
set exclude_nicks "nick1;nick2;nick3;"
|
if it can be like this so will be thankfull.
F|irT |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Wed Jul 26, 2017 6:00 pm Post subject: |
|
|
let me know...
| Code: |
set list_of_chans "#chan1 #chan2"
# interval in minutes between checks.
set check_interval 5
# allowed time in minutes for an op to be idle.
set op_allowed_time 45
# allowed time in minutes for a voiced user to be idle.
set vo_allowed_time 10
# nicks to be exempted from Deop
set op_exclude_nicks "nick1,nick2,nick3"
# nicks to be exempted from devoice
set vo_exclude_nicks "nick1,nick2,nick3"
set op_exclude_nicks [string tolower $op_exclude_nicks]
set vo_exclude_nicks [string tolower $vo_exclude_nicks]
proc inactive_checker { chan } {
global op_exclude_nicks vo_exclude_nicks op_allowed_time vo_allowed_time
if {![botisop $chan]} { return 0 }
foreach nk [chanlist $chan] {
set nk [string tolower $nk]
if {[isbotnick $nk] || [onchansplit $nk $chan]} { continue }
if {[matchattr [nick2hand $nk $chan] f]} { continue }
if {[isop $nk $chan] && ![string match "*,$nk,*" ",$op_exclude_nicks,"]} {
if {[getchanidle $nk $chan] >= $op_allowed_time} {
putserv "mode $chan -ok $nk Idle.Op"
}
}
if {[isvoice $nk $chan] && ![string match "*,$nk,*" ",$vo_exclude_nicks,"]} {
if {[getchanidle $nk $chan] >= $vo_allowed_time} {
putserv "mode $chan -vk $nk Idle.Devoice"
}
}
}
}
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
|
_________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
F|irT Voice
Joined: 30 Apr 2015 Posts: 30 Location: Pakistan
|
Posted: Wed Jul 26, 2017 7:08 pm Post subject: No Bugs, No Error, |
|
|
I test This tcl .. result is perfect... No Bugs, No Error,
running on DALnet network ..
Thank you SpiKe^^ to making it rite.. |
|
| Back to top |
|
 |
F|irT Voice
Joined: 30 Apr 2015 Posts: 30 Location: Pakistan
|
Posted: Fri Jul 28, 2017 12:31 am Post subject: |
|
|
| Code: |
set list_of_chans "#sukoon"
# interval in minutes between checks.
set check_interval 5
# allowed time in minutes for an op to be idle.
set op_allowed_time 120
# allowed time in minutes for a voiced user to be idle.
set vo_allowed_time 60
# nicks to be exempted from Deop
set op_exclude_nicks "nick1,nick2,nick3"
# nicks to be exempted from devoice
set vo_exclude_nicks "nick1,nick2,nick3"
set op_exclude_nicks [string tolower $op_exclude_nicks]
set vo_exclude_nicks [string tolower $vo_exclude_nicks]
proc inactive_checker { chan } {
global op_exclude_nicks vo_exclude_nicks op_allowed_time vo_allowed_time
if {![botisop $chan]} { return 0 }
foreach nk [chanlist $chan] {
set nk [string tolower $nk]
if {[isbotnick $nk] || [onchansplit $nk $chan]} { continue }
if {[matchattr [nick2hand $nk $chan] f]} { continue }
if {[isop $nk $chan] && ![string match "*,$nk,*" ",$op_exclude_nicks,"]} {
if {[getchanidle $nk $chan] >= $op_allowed_time} {
putserv "mode $chan -ok $nk Idle.Op"
}
}
if {[isvoice $nk $chan] && ![string match "*,$nk,*" ",$vo_exclude_nicks,"]} {
if {[getchanidle $nk $chan] >= $vo_allowed_time} {
putserv "mode $chan -vk $nk Idle.Devoice"
}
}
}
}
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
|
i check this tcl it was working fine in starting but now it has started problem like .. devoice deop on idel time not working... here is the some result of.
| Quote: |
<(MaSt3r> [12:56:00] Tcl error in script for 'timer22475':
<(MaSt3r> [12:56:00] illegal channel: #chan2
eXtreme-op has been idle 1hr 42mins 48secs, signed on Tue Jun 13 21:52:24 2017
MaSt3r sets mode: -vk eXtreme-op Idle.Devoice
[18:01] <F|irT> bot just devoice him after i rehsh the bot
[09:06] * MaSt3r sets mode: -ok DaD Idle.Op
DaD has been idle 5mins, signed on Sat Jul 22 14:04:48 2017
[09:06] * MaSt3r sets mode: -ok ZarNaH Idle.devoice
[09:15] ZarNaH has been idle 12mins 31secs, signed on Fri Jul 28 01:03:10 2017
|
|
|
| Back to top |
|
 |
Colins05 Voice
Joined: 05 Aug 2017 Posts: 1
|
Posted: Sat Aug 05, 2017 11:17 am Post subject: Re: Bugs on tcl |
|
|
| Merci beaucoup, cette code est vraiment utile |
|
| Back to top |
|
 |
|
|
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
|
|