mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-26 04:28:17 +02:00
+ MCI: PT - total messages posted today (non-private)
+ MCI: TP - total messages/posts on system (non-private, includes imports, only counts *current*, not all of time) * Move some stats to startup() calls * Fix some DATE() comparisons in SQL to use 'localtime' as our timestamps include TZ * Update luciano_blocktronics SYSSTAT to show more info
This commit is contained in:
parent
fb13381bb5
commit
6cce013187
12 changed files with 98 additions and 26 deletions
|
@ -25,6 +25,7 @@ const Config = require('./config.js').get;
|
|||
const { getAddressedToInfo } = require('./mail_util.js');
|
||||
const Events = require('./events.js');
|
||||
const UserProps = require('./user_property.js');
|
||||
const SysProps = require('./system_property.js');
|
||||
|
||||
// deps
|
||||
const async = require('async');
|
||||
|
@ -470,7 +471,7 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
|||
);
|
||||
}
|
||||
|
||||
updateUserStats(cb) {
|
||||
updateUserAndSystemStats(cb) {
|
||||
if(Message.isPrivateAreaTag(this.message.areaTag)) {
|
||||
Events.emit(Events.getSystemEvents().UserSendMail, { user : this.client.user });
|
||||
if(cb) {
|
||||
|
@ -480,6 +481,9 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
|||
}
|
||||
|
||||
Events.emit(Events.getSystemEvents().UserPostMessage, { user : this.client.user, areaTag : this.message.areaTag });
|
||||
|
||||
StatLog.incrementNonPersistentSystemStat(SysProps.MessageTotalCount, 1);
|
||||
StatLog.incrementNonPersistentSystemStat(SysProps.MessagesToday, 1);
|
||||
return StatLog.incrementUserStat(this.client.user, UserProps.MessagePostCount, 1, cb);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue