aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/admin
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/commands/admin')
-rw-r--r--server/src/commands/admin/addmod.js2
-rw-r--r--server/src/commands/admin/listusers.js2
-rw-r--r--server/src/commands/admin/reload.js8
-rw-r--r--server/src/commands/admin/removemod.js2
-rw-r--r--server/src/commands/admin/saveconfig.js2
-rw-r--r--server/src/commands/admin/shout.js2
6 files changed, 9 insertions, 9 deletions
diff --git a/server/src/commands/admin/addmod.js b/server/src/commands/admin/addmod.js
index a30b175..6853a42 100644
--- a/server/src/commands/admin/addmod.js
+++ b/server/src/commands/admin/addmod.js
@@ -6,7 +6,7 @@
exports.run = async (core, server, socket, data) => {
// increase rate limit chance and ignore if not admin
if (socket.uType != 'admin') {
- return server._police.frisk(socket.remoteAddress, 20);
+ return server.police.frisk(socket.remoteAddress, 20);
}
// add new trip to config
diff --git a/server/src/commands/admin/listusers.js b/server/src/commands/admin/listusers.js
index 472b89d..5ff350f 100644
--- a/server/src/commands/admin/listusers.js
+++ b/server/src/commands/admin/listusers.js
@@ -6,7 +6,7 @@
exports.run = async (core, server, socket, data) => {
// increase rate limit chance and ignore if not admin
if (socket.uType != 'admin') {
- return server._police.frisk(socket.remoteAddress, 20);
+ return server.police.frisk(socket.remoteAddress, 20);
}
// find all users currently in a channel
diff --git a/server/src/commands/admin/reload.js b/server/src/commands/admin/reload.js
index 27be19c..588d1c5 100644
--- a/server/src/commands/admin/reload.js
+++ b/server/src/commands/admin/reload.js
@@ -6,11 +6,11 @@
exports.run = async (core, server, socket, data) => {
// increase rate limit chance and ignore if not admin
if (socket.uType != 'admin') {
- return server._police.frisk(socket.remoteAddress, 20);
+ return server.police.frisk(socket.remoteAddress, 20);
}
// do command reload and store results
- let loadResult = core.dynamicImports.reloadDirCache('src/commands');
+ let loadResult = core.dynamicImports.reloadDirCache();
loadResult += core.commands.loadCommands();
// clear and rebuild all module hooks
@@ -18,9 +18,9 @@ exports.run = async (core, server, socket, data) => {
// build reply based on reload results
if (loadResult == '') {
- loadResult = `Reloaded ${core.commands._commands.length} commands, 0 errors`;
+ loadResult = `Reloaded ${core.commands.commands.length} commands, 0 errors`;
} else {
- loadResult = `Reloaded ${core.commands._commands.length} commands, error(s):
+ loadResult = `Reloaded ${core.commands.commands.length} commands, error(s):
${loadResult}`;
}
diff --git a/server/src/commands/admin/removemod.js b/server/src/commands/admin/removemod.js
index 87f4124..a2d862c 100644
--- a/server/src/commands/admin/removemod.js
+++ b/server/src/commands/admin/removemod.js
@@ -6,7 +6,7 @@
exports.run = async (core, server, socket, data) => {
// increase rate limit chance and ignore if not admin
if (socket.uType != 'admin') {
- return server._police.frisk(socket.remoteAddress, 20);
+ return server.police.frisk(socket.remoteAddress, 20);
}
// remove trip from config
diff --git a/server/src/commands/admin/saveconfig.js b/server/src/commands/admin/saveconfig.js
index a95a39a..65fff0e 100644
--- a/server/src/commands/admin/saveconfig.js
+++ b/server/src/commands/admin/saveconfig.js
@@ -6,7 +6,7 @@
exports.run = async (core, server, socket, data) => {
// increase rate limit chance and ignore if not admin
if (socket.uType != 'admin') {
- return server._police.frisk(socket.remoteAddress, 20);
+ return server.police.frisk(socket.remoteAddress, 20);
}
// attempt save, notify of failure
diff --git a/server/src/commands/admin/shout.js b/server/src/commands/admin/shout.js
index e9c69e0..821a22a 100644
--- a/server/src/commands/admin/shout.js
+++ b/server/src/commands/admin/shout.js
@@ -6,7 +6,7 @@
exports.run = async (core, server, socket, data) => {
// increase rate limit chance and ignore if not admin
if (socket.uType != 'admin') {
- return server._police.frisk(socket.remoteAddress, 20);
+ return server.police.frisk(socket.remoteAddress, 20);
}
// send text to all channels