aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/admin/shout.js
blob: 2efff32dd8cbec127b7101ddec33df8eeae3f5e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
  Description: Emmits a server-wide message as `info`
*/

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' };