Hi there,
i want to write a tcl for reading a channel peak from stats.mod database and when there is a peak my bot to tell it in the channel. Can enybody tell me how to access peak in stats 'dat' file?
it's user peak for that channel. I'm not sure what is the meaning of this number after '!' sign. And second how to catch when stats.mod detects peak to display it on the channel.
Detecting the peak change from the file will be much harder and much more cpu intensive than just using a separate script for keeping track of and announcing the peak.
Ok i will get peak the way peak.tcl gets it but old peak have to be read from stats dat ot eliminate external file that peak.tcl writes. Statsmod takes care for writing peak values in his file.
Problem is how to access this peak values in statsmod.dat file?
My english is not so good because i'm from Bulgaria.
I was using a tcl for channel peak and it writes a separate file for peak values. Then i start to use statsmod. Stats writes peak values in his dat file too. So i remove peak.tcl and start to think how to read peak values from statsmod.dat thats it
What I'm trying to figure out is how you'll find the peak value. Will it be at a fixed position or will you have to look for it in a huge file containing lots of other crap?
I was going to suggest using a udef for storing the peak, but if the number is easily extracted from an existing file there's no point in that
A search through a file each time someone joins? Your bot will scream in pain during net merges Why not read the file at startup and keep the value in a element of a global array? Then upon each join check if [llength [chanlist #chan]]>that_value and announce + change the var if it is.