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,
|
hostname: null,
|
||||||
irc: null,
|
irc: null,
|
||||||
serverOptions: {
|
serverOptions: {
|
||||||
CHANTYPES: [],
|
CHANTYPES: ["#", "&"],
|
||||||
PREFIX: [],
|
PREFIX: ["!", "@", "%", "+"],
|
||||||
NETWORK: "",
|
NETWORK: "",
|
||||||
},
|
},
|
||||||
chanCache: [],
|
chanCache: [],
|
||||||
|
@ -149,8 +149,14 @@ module.exports = function(irc, network) {
|
|||||||
network.prefixLookup[mode.mode] = mode.symbol;
|
network.prefixLookup[mode.mode] = mode.symbol;
|
||||||
});
|
});
|
||||||
|
|
||||||
network.serverOptions.CHANTYPES = data.options.CHANTYPES;
|
if (data.options.CHANTYPES) {
|
||||||
network.serverOptions.PREFIX = data.options.PREFIX.map((p) => p.symbol);
|
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;
|
network.serverOptions.NETWORK = data.options.NETWORK;
|
||||||
|
|
||||||
client.emit("network:options", {
|
client.emit("network:options", {
|
||||||
|
Loading…
Reference in New Issue
Block a user