Network info no longer stored in gateway
authorDarren <darren@darrenwhitlen.com>
Sat, 10 May 2014 12:38:59 +0000 (13:38 +0100)
committerDarren <darren@darrenwhitlen.com>
Sat, 10 May 2014 12:38:59 +0000 (13:38 +0100)
client/src/models/application.js
client/src/models/memberlist.js

index 74c258df91a6f4997f6b1eac2e2f24d97e5f910c..ff7d1e76989795a794fa09e25b388cea149ad7b3 100644 (file)
             _.each(fn_to_bind, function(fn, event_name) {\r
                 controlbox.on(event_name, _.bind(fn, that));\r
             });\r
-        },\r
-\r
-\r
-        isChannelName: function (channel_name) {\r
-            var channel_prefix = _kiwi.gateway.get('channel_prefix');\r
-\r
-            if (!channel_name || !channel_name.length) return false;\r
-            return (channel_prefix.indexOf(channel_name[0]) > -1);\r
         }\r
     });\r
 \r
 \r
         if (ev.params.length === 0) return;\r
 \r
-        if (this.isChannelName(ev.params[0])) {\r
+        if (this.connections.active_connection.isChannelName(ev.params[0])) {\r
             channel_name = ev.params[0];\r
             ev.params.shift();\r
         } else {\r
index bb3d0a377b24246bedb1197add8bb67156703094..77beb06a076a4e26aaceeae92294510f59b51379 100644 (file)
@@ -2,9 +2,11 @@ _kiwi.model.MemberList = Backbone.Collection.extend({
     model: _kiwi.model.Member,\r
     comparator: function (a, b) {\r
         var i, a_modes, b_modes, a_idx, b_idx, a_nick, b_nick;\r
-        var user_prefixes = _kiwi.gateway.get('user_prefixes');\r
+        var user_prefixes = this.channel.get('network').get('user_prefixes');\r
+\r
         a_modes = a.get("modes");\r
         b_modes = b.get("modes");\r
+\r
         // Try to sort by modes first\r
         if (a_modes.length > 0) {\r
             // a has modes, but b doesn't so a should appear first\r