it used to cycle in every 3 mins,
Original code:
Code: Select all
set cycle_time 3
if {![info exists spam_timer]} { set spam_timer [timer $cycle_time cycle_chans] }
set recent_cycle 0
proc cycle_chans { } {
global cycle_time spam_timer recent_cycle
set cycle_chan "#channel"
foreach chan [channels] {
if {![string match *cycle* $chan]} { set cycle_chan "$cycle_chan,$chan" }
}
putserv "part $cycle_chan"
putserv "join $cycle_chan"
set spam_timer [timer $cycle_time cycle_chans]
set recent_cycle 1
utimer [expr $cycle_time * 60 - 30] reset_recent_cycle ....
changed code, cycles every 53 secs but sometimes stays outta chan
Code: Select all
set cycle_time 53
if {![info exists spam_timer]} { set spam_timer [utimer $cycle_time cycle_chans] }
set recent_cycle 0
proc cycle_chans { } {
global cycle_time spam_timer recent_cycle
set cycle_chan "#channel"
foreach chan [channels] {
if {![string match *cycle* $chan]} { set cycle_chan "$cycle_chan" }
}
putserv "part $cycle_chan"
putserv "join $cycle_chan"
set spam_timer [utimer $cycle_time cycle_chans]
set recent_cycle 1
utimer [expr $cycle_time * 1 - 0.5] reset_recent_cycle ..
I find it every odd and I don't know what can cause that, thx for any help[14:46] (acc0rd) [14:46] Server says I'm not on channel: #channel
[14:46] (N6) .tcl utimers
[14:46] (acc0rd) TCL: {46 cycle_chans timer1500} {40 reset_recent_cycle timer1501}