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
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
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);
} }