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 

Looping timer that halts

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
nso
Voice


Joined: 25 Apr 2003
Posts: 19

PostPosted: Tue Sep 23, 2003 4:27 am    Post subject: Looping timer that halts Reply with quote

I've got a script that communicates with a vBB (virtual bulletin board) PHP forum.
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:


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
}


Any bright ideas on what may be wrong ?

- nso
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
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