blob: 4c6dff88988ec3d4d407e8c8a09a60fd296290ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/*
*/
'use strict';
exports.run = async (core, server, socket, data) => {
if (socket.uType != 'admin') {
// ignore if not admin
return;
}
let saveResult = core.managers.config.save();
if (!saveResult) {
server.reply({
cmd: 'warn',
text: 'Failed to save config, check logs.'
}, client);
return;
}
server.reply({
cmd: 'info',
text: 'Config saved!'
}, socket);
server.broadcast({
cmd: 'info',
text: 'Config saved!'
}, { uType: 'mod' });
};
exports.info = {
name: 'saveconfig',
description: 'Saves current config'
};
|