Modules register a "Midnight Cleanup Routine" when calling REGISTER_MODULE() during init. On a traditional MajorBBS/Worldgroup install, this routine is invoked once per day (3:00A by default). Most modules use this routine to handle cleanup, user maintenance, and daily resets for mobs, etc.
MBBSEmu should:
Have a configuration option in the appsettings.json of a time (UTC? Local?) for the time of day this routine is to run
The Worker Thread/Event Loop in MbbsHost.cs should be enhanced to execute these routines in each registered module once per day at the given time
Would also be nice to be able to programmatically invoke the cleanup handler, whether it be via a signal handler (SIGUSR1 for example) or some other mechanism.
Modules register a "Midnight Cleanup Routine" when calling
REGISTER_MODULE()
during init. On a traditional MajorBBS/Worldgroup install, this routine is invoked once per day (3:00A by default). Most modules use this routine to handle cleanup, user maintenance, and daily resets for mobs, etc.MBBSEmu should:
https://github.com/enusbaum/MBBSEmu/blob/master/MBBSEmu/HostProcess/MbbsHost.cs
Note: As per the MajorBBS Development Guide, the Channel Number while Auto-Cleanup operations are being invoked should be set to -2 (0xFFFE)