When a scripted event occurs in the PHPscript, it stores a string to a file which the TCl checks every couple of seconds for new info.
The script works fine and dandy, but it seems like the timer halts sometimes.. It does not produce any errormessages, which I'm aware off. This can occur on totally random times, and I've been twisting my brain with this one, not being able to locate the problem.
The relevant code is here;
Code: Select all
if {![info exists mytimer]} {
set mytimer [utimer 5 checksize]
}
proc checksize { } {
global logsize vbblogfile
set newsize [file size $vbblogfile]
if { $newsize == 0 } {
vbbtimer
return 0
}
if { [file size $vbblogfile] == $logsize } {
vbbtimer
return 0
} else {
set threadinfo [exec tail -n1 $vbblogfile]
[...]
putquick "privmsg $reportchan : "
putserv "privmsg $reportchan :$threadinfo"
set logsize $newsize
vbbtimer
return 0
}
}
proc vbbtimer { } {
utimer 5 checksize
}
- nso