Merge pull request #647 from nornagon/prefix-lookup

Fill in prefixLookup on network initialization
This commit is contained in:
Jérémie Astori 2016-10-12 03:37:06 -04:00 committed by GitHub
commit 93c4c14b72

View file

@ -48,6 +48,11 @@ module.exports = function(irc, network) {
}); });
irc.on("socket connected", function() { 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({ network.channels[0].pushMessage(client, new Msg({
text: "Connected to the network." text: "Connected to the network."
})); }));