From 12ba9939758c9d84c22bcfe43b8b3e94be64e4a7 Mon Sep 17 00:00:00 2001 From: Darren Date: Sat, 10 May 2014 13:38:59 +0100 Subject: [PATCH] Network info no longer stored in gateway --- client/src/models/application.js | 10 +--------- client/src/models/memberlist.js | 4 +++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/client/src/models/application.js b/client/src/models/application.js index 74c258d..ff7d1e7 100644 --- a/client/src/models/application.js +++ b/client/src/models/application.js @@ -478,14 +478,6 @@ _.each(fn_to_bind, function(fn, event_name) { controlbox.on(event_name, _.bind(fn, that)); }); - }, - - - isChannelName: function (channel_name) { - var channel_prefix = _kiwi.gateway.get('channel_prefix'); - - if (!channel_name || !channel_name.length) return false; - return (channel_prefix.indexOf(channel_name[0]) > -1); } }); @@ -579,7 +571,7 @@ if (ev.params.length === 0) return; - if (this.isChannelName(ev.params[0])) { + if (this.connections.active_connection.isChannelName(ev.params[0])) { channel_name = ev.params[0]; ev.params.shift(); } else { diff --git a/client/src/models/memberlist.js b/client/src/models/memberlist.js index bb3d0a3..77beb06 100644 --- a/client/src/models/memberlist.js +++ b/client/src/models/memberlist.js @@ -2,9 +2,11 @@ _kiwi.model.MemberList = Backbone.Collection.extend({ model: _kiwi.model.Member, comparator: function (a, b) { var i, a_modes, b_modes, a_idx, b_idx, a_nick, b_nick; - var user_prefixes = _kiwi.gateway.get('user_prefixes'); + var user_prefixes = this.channel.get('network').get('user_prefixes'); + a_modes = a.get("modes"); b_modes = b.get("modes"); + // Try to sort by modes first if (a_modes.length > 0) { // a has modes, but b doesn't so a should appear first -- 2.25.1