Monitor: Implement warnDeprecated (warns once)

This commit is contained in:
Ivo Julca 2026-04-11 21:41:27 -05:00
parent 55725c3ade
commit 13f10bb9f6

View File

@ -62,6 +62,7 @@ export const Monitor = new class {
battlePreps = new TimedCounter();
groupChats = new TimedCounter();
tickets = new TimedCounter();
deprecationsWarned = new Set();
activeIp: string | null = null;
networkUse: { [k: string]: number } = {};
@ -160,6 +161,12 @@ export const Monitor = new class {
}
}
warnDeprecated(text: string, details = '') {
if (this.deprecationsWarned.has(text)) return;
this.deprecationsWarned.add(text);
return this.warn(`${text}${details}`);
}
slow(text: string) {
const logRoom = Rooms.get('slowlog');
if (logRoom) {