diff options
Diffstat (limited to 'server/src/commands/admin/shout.js')
-rw-r--r-- | server/src/commands/admin/shout.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/server/src/commands/admin/shout.js b/server/src/commands/admin/shout.js new file mode 100644 index 0000000..c3cfded --- /dev/null +++ b/server/src/commands/admin/shout.js @@ -0,0 +1,25 @@ +/* + +*/ + +'use strict'; + +exports.run = async (core, server, socket, data) => { + if (socket.uType != 'admin') { + // ignore if not admin + return; + } + + server.broadcast( { + cmd: 'info', + text: `Server Notice: ${data.text}` + }, {}); +}; + +exports.requiredData = ['text']; + +exports.info = { + name: 'shout', + usage: 'shout {text}', + description: 'Displays passed text to every client connected' +}; |