From: Darren Date: Sat, 10 May 2014 13:30:28 +0000 (+0100) Subject: Consistent 'connection' rather than 'server' in - part 2 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b277f3a6ca1c8a9252de77d1964156c8396c0123;p=KiwiIRC.git Consistent 'connection' rather than 'server' in - part 2 --- diff --git a/client/src/models/gateway.js b/client/src/models/gateway.js index ab80bcc..3210654 100644 --- a/client/src/models/gateway.js +++ b/client/src/models/gateway.js @@ -297,7 +297,7 @@ _kiwi.model.Gateway = function () { connection_id = _kiwi.app.connections.active_connection.get('connection_id'); var data_buffer = { - server: connection_id, + connection_id: connection_id, data: JSON.stringify(data) }; this.rpc.call('irc', data_buffer, callback); diff --git a/server/client.js b/server/client.js index 1798b38..0d27ddb 100755 --- a/server/client.js +++ b/server/client.js @@ -85,14 +85,14 @@ function handleClientMessage(msg, callback) { server; // Make sure we have a server number specified - if ((msg.server === null) || (typeof msg.server !== 'number')) { + if ((msg.connection_id === null) || (typeof msg.connection_id !== 'number')) { return (typeof callback === 'function') ? callback('server not specified') : undefined; - } else if (!this.state.irc_connections[msg.server]) { + } else if (!this.state.irc_connections[msg.connection_id]) { return (typeof callback === 'function') ? callback('not connected to server') : undefined; } // The server this command is directed to - server = this.state.irc_connections[msg.server]; + server = this.state.irc_connections[msg.connection_id]; if (typeof callback !== 'function') { callback = null;