防沉迷:下线时汇报时间

This commit is contained in:
luying
2021-03-09 11:04:54 +08:00
parent 92006fc886
commit ae1f89abf7

View File

@@ -20,6 +20,7 @@ import { gameData } from '../../../pubUtils/data';
import { getMails } from '../../../services/mailService';
import { addRoleToGuildChannel, addRoleToSysChannel, addRoleToWorldChannel, leaveGuildChannel, leaveSysChannel, leaveWorldChannel } from '../../../services/chatService';
import { reportOnlineSchedule } from '../../../services/timeTaskService';
export default function (app: Application) {
return new EntryHandler(app);
}
@@ -155,6 +156,7 @@ export class EntryHandler {
await leaveWorldChannel(roleId, sid, serverId);
await leaveGuildChannel(roleId, sid);
RoleModel.updateRoleInfo(roleId, { quitTime: nowSeconds() });
reportOnlineSchedule();
}