Fill in prefixLookup on network initialization

Fixes #644.
This commit is contained in:
Jeremy Apthorp 2016-09-27 10:33:28 -07:00
parent 6b597d3b2f
commit b7814bc571

View File

@ -48,6 +48,11 @@ module.exports = function(irc, network) {
});
irc.on("socket connected", function() {
network.prefixLookup = {};
irc.network.options.PREFIX.forEach(function(mode) {
network.prefixLookup[mode.mode] = mode.symbol;
});
network.channels[0].pushMessage(client, new Msg({
text: "Connected to the network."
}));