aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/core
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/commands/core')
-rw-r--r--server/src/commands/core/chat.js2
-rw-r--r--server/src/commands/core/invite.js2
-rw-r--r--server/src/commands/core/join.js2
-rw-r--r--server/src/commands/core/morestats.js16
-rw-r--r--server/src/commands/core/stats.js2
5 files changed, 12 insertions, 12 deletions
diff --git a/server/src/commands/core/chat.js b/server/src/commands/core/chat.js
index 3455453..bb9584e 100644
--- a/server/src/commands/core/chat.js
+++ b/server/src/commands/core/chat.js
@@ -57,7 +57,7 @@ exports.run = async (core, server, socket, data) => {
server.broadcast( payload, { channel: socket.channel});
// stats are fun
- core.managers.stats.increment('messages-sent');
+ core.stats.increment('messages-sent');
};
// module hook functions
diff --git a/server/src/commands/core/invite.js b/server/src/commands/core/invite.js
index 8374309..046e47a 100644
--- a/server/src/commands/core/invite.js
+++ b/server/src/commands/core/invite.js
@@ -59,7 +59,7 @@ exports.run = async (core, server, socket, data) => {
}, socket);
// stats are fun
- core.managers.stats.increment('invites-sent');
+ core.stats.increment('invites-sent');
};
// module meta
diff --git a/server/src/commands/core/join.js b/server/src/commands/core/join.js
index 8b6a971..ce900db 100644
--- a/server/src/commands/core/join.js
+++ b/server/src/commands/core/join.js
@@ -135,7 +135,7 @@ exports.run = async (core, server, socket, data) => {
}, socket);
// stats are fun
- core.managers.stats.increment('users-joined');
+ core.stats.increment('users-joined');
};
// module meta
diff --git a/server/src/commands/core/morestats.js b/server/src/commands/core/morestats.js
index 69740a9..a71729c 100644
--- a/server/src/commands/core/morestats.js
+++ b/server/src/commands/core/morestats.js
@@ -43,17 +43,17 @@ exports.run = async (core, server, socket, data) => {
cmd: 'info',
text: stripIndents`current-connections: ${uniqueClientCount}
current-channels: ${uniqueChannels}
- users-joined: ${(core.managers.stats.get('users-joined') || 0)}
- invites-sent: ${(core.managers.stats.get('invites-sent') || 0)}
- messages-sent: ${(core.managers.stats.get('messages-sent') || 0)}
- users-banned: ${(core.managers.stats.get('users-banned') || 0)}
- users-kicked: ${(core.managers.stats.get('users-kicked') || 0)}
- stats-requested: ${(core.managers.stats.get('stats-requested') || 0)}
- server-uptime: ${formatTime(process.hrtime(core.managers.stats.get('start-time')))}`
+ users-joined: ${(core.stats.get('users-joined') || 0)}
+ invites-sent: ${(core.stats.get('invites-sent') || 0)}
+ messages-sent: ${(core.stats.get('messages-sent') || 0)}
+ users-banned: ${(core.stats.get('users-banned') || 0)}
+ users-kicked: ${(core.stats.get('users-kicked') || 0)}
+ stats-requested: ${(core.stats.get('stats-requested') || 0)}
+ server-uptime: ${formatTime(process.hrtime(core.stats.get('start-time')))}`
}, socket);
// stats are fun
- core.managers.stats.increment('stats-requested');
+ core.stats.increment('stats-requested');
};
// module hook functions
diff --git a/server/src/commands/core/stats.js b/server/src/commands/core/stats.js
index b271bb1..ff4b1ef 100644
--- a/server/src/commands/core/stats.js
+++ b/server/src/commands/core/stats.js
@@ -27,7 +27,7 @@ exports.run = async (core, server, socket, data) => {
}, socket);
// stats are fun
- core.managers.stats.increment('stats-requested');
+ core.stats.increment('stats-requested');
};
// module meta