Check that CHANTYPES and PREFIX are set, and set defaults
This commit is contained in:
parent
71b3acb152
commit
a4ec875c87
@ -40,8 +40,8 @@ function Network(attr) {
|
||||
hostname: null,
|
||||
irc: null,
|
||||
serverOptions: {
|
||||
CHANTYPES: [],
|
||||
PREFIX: [],
|
||||
CHANTYPES: ["#", "&"],
|
||||
PREFIX: ["!", "@", "%", "+"],
|
||||
NETWORK: "",
|
||||
},
|
||||
chanCache: [],
|
||||
|
@ -149,8 +149,14 @@ module.exports = function(irc, network) {
|
||||
network.prefixLookup[mode.mode] = mode.symbol;
|
||||
});
|
||||
|
||||
network.serverOptions.CHANTYPES = data.options.CHANTYPES;
|
||||
network.serverOptions.PREFIX = data.options.PREFIX.map((p) => p.symbol);
|
||||
if (data.options.CHANTYPES) {
|
||||
network.serverOptions.CHANTYPES = data.options.CHANTYPES;
|
||||
}
|
||||
|
||||
if (network.serverOptions.PREFIX) {
|
||||
network.serverOptions.PREFIX = data.options.PREFIX.map((p) => p.symbol);
|
||||
}
|
||||
|
||||
network.serverOptions.NETWORK = data.options.NETWORK;
|
||||
|
||||
client.emit("network:options", {
|
||||
|
Loading…
Reference in New Issue
Block a user