From d772b95daa8e9261f7f530c22ed2db14ddc1fc17 Mon Sep 17 00:00:00 2001 From: Darren Date: Wed, 2 Apr 2014 13:55:25 +0100 Subject: [PATCH] Correct user prefix defaults for ircds not providing them (ircd.js) --- client/src/models/network.js | 8 +++++++- server/irc/connection.js | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/client/src/models/network.js b/client/src/models/network.js index a0ba547..192e8ef 100644 --- a/client/src/models/network.js +++ b/client/src/models/network.js @@ -49,7 +49,13 @@ * The user prefixes for channel owner/admin/op/voice etc. on this network * @type Array */ - user_prefixes: ['~', '&', '@', '+'], + user_prefixes: [ + {symbol: '~', mode: 'q'}, + {symbol: '&', mode: 'a'}, + {symbol: '@', mode: 'o'}, + {symbol: '%', mode: 'h'}, + {symbol: '+', mode: 'v'} + ], /** * List of nicks we are ignoring diff --git a/server/irc/connection.js b/server/irc/connection.js index cea63de..4d9a8e9 100644 --- a/server/irc/connection.js +++ b/server/irc/connection.js @@ -111,6 +111,14 @@ var IrcConnection = function (hostname, port, ssl, nick, user, options, state, c // Options sent by the IRCd this.options = Object.create(null); + this.options.PREFIX = [ + {symbol: '~', mode: 'q'}, + {symbol: '&', mode: 'a'}, + {symbol: '@', mode: 'o'}, + {symbol: '%', mode: 'h'}, + {symbol: '+', mode: 'v'} + ]; + this.cap = {requested: [], enabled: []}; // Is SASL supported on the IRCd -- 2.25.1