Flipped boolean logic to not break old configs

This commit is contained in:
zneix 2021-03-23 10:56:20 +01:00
parent 2ad6627e02
commit 529344c76d
No known key found for this signature in database
GPG Key ID: 911916E0523B22F6
2 changed files with 4 additions and 4 deletions

View File

@ -2,10 +2,10 @@
"Username": "", "Username": "",
"Password": "", "Password": "",
"PNSLToken": "", "PNSLToken": "",
"UsePNSL": true, "IgnorePNSL": false,
"Users": [], "Users": [],
"Prefix": "!!", "Prefix": "!!",
"MaxConnections": 30, "MaxConnections": 30,
"MaxChunkSize": 2000, "MaxChunkSize": 2000,
"DelayPerChunk": 30e3 "DelayPerChunk": 30e3
} }

View File

@ -121,7 +121,7 @@ const say = (channel, message) => {
getConnection().say(channel, message); getConnection().say(channel, message);
}; };
if (Config.UsePNSL){ if (!Config.IgnorePNSL){
const pnslWebSocket = new WS('wss://bot.tetyys.com/api/wss', [], {headers: {Authorization: `Bearer ${Config.PNSLToken}`}}); const pnslWebSocket = new WS('wss://bot.tetyys.com/api/wss', [], {headers: {Authorization: `Bearer ${Config.PNSLToken}`}});
pnslWebSocket.on('open', () => { pnslWebSocket.on('open', () => {
@ -210,7 +210,7 @@ if (Config.UsePNSL){
const mods = await getConnection().getMods(channel); const mods = await getConnection().getMods(channel);
if (!mods.includes(Config.Username)) return say(Config.Username, `I am not a moderator in channel ${channel}!`); if (!mods.includes(Config.Username)) return say(Config.Username, `I am not a moderator in channel ${channel}!`);
} }
if (Config.UsePNSL) { if (!Config.IgnorePNSL) {
const data = await fetchList(listID); const data = await fetchList(listID);
await runList(data.listData, listID, channel || channelName); await runList(data.listData, listID, channel || channelName);
} }