From: Darren Date: Fri, 19 Sep 2014 13:51:43 +0000 (+0100) Subject: Consistent rpc API between browser<->server X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c6629f51e9643edb5773bd78d697512e723da630;p=KiwiIRC.git Consistent rpc API between browser<->server --- diff --git a/client/src/app.js b/client/src/app.js index 6f95977..0ff5665 100644 --- a/client/src/app.js +++ b/client/src/app.js @@ -20,6 +20,7 @@ _kiwi.global = { settings: undefined, // Instance of _kiwi.model.DataStore plugins: undefined, // Instance of _kiwi.model.PluginManager events: undefined, // Instance of PluginInterface + rpc: undefined, // Instance of WebsocketRpc utils: {}, // References to misc. re-usable helpers / functions initUtils: function() { @@ -32,22 +33,6 @@ _kiwi.global = { this.utils.hsl2rgb = hsl2rgb; }, - rpc: function() { - if (!_kiwi.gateway.rpc) { - throw 'RPC unavailable. Is Kiwi connected to the server yet?'; - } - - return _kiwi.gateway.rpc.apply(_kiwi.gateway.rpc, arguments); - }, - - rpcNamespace: function(namespace) { - if (!_kiwi.gateway.rpc) { - throw 'RPC unavailable. Is Kiwi connected to the server yet?'; - } - - return _kiwi.gateway.rpc.namespace(namespace); - }, - addMediaMessageType: function(match, buildHtml) { _kiwi.view.MediaMessage.addType(match, buildHtml); },