Mercurial > eldonilo > avatar
changeset 4:8acaa0a575c7
Allow configuration of the host.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 19 May 2011 17:21:16 +0200 |
parents | 805f24754ff1 |
children | 9b2f17ea1594 |
files | avatar.js configuration.js |
diffstat | 2 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/avatar.js +++ b/avatar.js @@ -24,12 +24,7 @@ var config = require('./configuration'); try { var xmpp = require('node-xmpp'); - var conn = new xmpp.Component({ - jid: config.jid, - password: config.password, - host: 'localhost', - port: 5347 - }); + var conn = new xmpp.Component(config); conn.on('stanza', function (stanza) { if (stanza.is('iq')) @@ -46,7 +41,7 @@ try { var Element = require('ltx').Element; } catch (e) { var xmpp = require('xmpp'); - var conn = new xmpp.Connection(); + var conn = new xmpp.Connection(config.host, config.port); conn.log = function (_, m) { console.log(m); };