aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/internal/socketreply.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/commands/internal/socketreply.js')
-rw-r--r--server/src/commands/internal/socketreply.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/src/commands/internal/socketreply.js b/server/src/commands/internal/socketreply.js
index e77d080..fa3b8cf 100644
--- a/server/src/commands/internal/socketreply.js
+++ b/server/src/commands/internal/socketreply.js
@@ -2,20 +2,19 @@
Description: Used to relay warnings to clients internally
*/
+// module main
exports.run = async (core, server, socket, data) => {
if (data.cmdKey !== server._cmdKey) {
// internal command attempt by client, increase rate limit chance and ignore
- server._police.frisk(socket.remoteAddress, 20);
-
- return;
+ return server._police.frisk(socket.remoteAddress, 20);
}
// send warning to target socket
server.reply({ cmd: 'warn', text: data.text }, socket);
};
+// module meta
exports.requiredData = ['cmdKey', 'text'];
-
exports.info = {
name: 'socketreply',
usage: 'Internal Use Only',