Caller Log
BBS Operation - The Caller Log System
The caller log is stored on disk in sequential file format. The filename is “√caller log" and it is maintained through the parameters you defined in SETUP. The caller log must always be stored on drive 0 because of BASIC programming space limitations. This is the only type of file that has this limitation, so it should pose no threat to a BBS system.
As the BBS system is running, the variable LG$ is automatically updated with log information whenever a program GOSUB's line 8003 (for i$) or 8004 (for a$). LG$ can hold a maximum of 250 characters before it is dumped into a special buffer in memory. This buffer can hold two "dumps" before the information has to be transferred to disk.
When the buffer is full, or when the BBS program forces the command, this buffer is transferred to a temporary file called "√l" on the Caller Log drive. If more than one file dump is made, the information is appended to the "√l" file.
When the BBS program returns to the wait-for-call screen, the "√l" file is appended to the "√caller log" file. This is when the message "Appending to Caller Log" appears on the screen. This message also appears when you shut down the system or the system crashes. This ensures that the caller log information is secure and complete.
In the process of appending to the caller log, a file called "√l.tmp" is created, which is an exact duplicate of "√l". This duplicate is not scratched and can be used to look at what occurred during the most recent call. This is taken advantage of with the "View Last Call?" question displayed when viewing the caller log. If you answer "Y", you will view a log of the last call. If you answer "N", then you will see the caller log in its entirety.
After viewing the full-length caller log, you will be asked if you wish to scratch the caller log. If you answer "Y", then the caller log will be scratched and restarted. If you answer "N" then the caller log will be left alone. If you wish to maintain daily records of the caller log, then do not scratch the log. The "Scratch Caller Log" option is level definable in SETUP.
Lines 28500-28770 in "√bbs.init" act as the caller log maintenance routine. This routine trims the caller log when it exceeds a designated size. The maximum size of "√caller log" is defined in SETUP. The file will also be limited by the "minimum UL space" setting in SETUP. If either the max size is reached, or the minimum amount of space is reached then the "√caller log” file will be trimmed by the number of blocks designated in SETUP.
The default maximum caller log size is 50 and the default trim size is 8. The 8 doesn't mean that only 8 blocks will be trimmed in all cases, but it means that the file will be trimmed to the necessary length, then 8 blocks will be removed to allow for more filling. The process is completely automatic and attempts to compensate for even the worst possible case. If all attempts at reducing the size of the caller log fail, the routine will scratch the caller log to prevent a Disk Full Error.
Next Section: MCI Commands