From b7814bc571ffee696f7816a83736ddba62006a20 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 27 Sep 2016 10:33:28 -0700 Subject: [PATCH] Fill in prefixLookup on network initialization Fixes #644. --- src/plugins/irc-events/connection.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/irc-events/connection.js b/src/plugins/irc-events/connection.js index 306872e6..0c5ab0f9 100644 --- a/src/plugins/irc-events/connection.js +++ b/src/plugins/irc-events/connection.js @@ -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." }));