1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

config hotfix

This commit is contained in:
NoobishSVK
2024-11-03 22:05:02 +01:00
parent 339b2b4258
commit 4500006749

View File

@@ -27,7 +27,7 @@ const dataHandler = require('./datahandler');
const fmdxList = require('./fmdx_list');
const { logDebug, logError, logInfo, logWarn, logChat } = require('./console');
const storage = require('./storage');
const { serverConfig, configExists } = require('./server_config');
const { serverConfig, configExists, configSave } = require('./server_config');
const pjson = require('../package.json');
// Function to find server files based on the plugins listed in config
@@ -433,7 +433,7 @@ wss.on('connection', (ws, request) => {
serverConfig.webserver.banlist.push(clientIp);
logInfo(`User \x1b[90m${clientIp}\x1b[0m has been added to the banlist due to extreme spam.`);
console.log(serverConfig.webserver.banlist);
serverConfig.configSave();
configSave();
}
ws.close(1008, 'Bot-like behavior detected');