1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
535 B

var sys = require('sys'),
xmpp = require('xmpp'),
events = require('events');
var Jid = function(plain) {
var tmp = plain.split('/');
this.resource = (tmp.length == 1) ? null : tmp[1];
tmp = tmp[0].split('@');
this.node = tmp[0];
this.domain = tmp[1];
};
exports.Jid = Jid;
var Client = function(_jid, password, host) {
events.EventEmitter.call(this);
var jabber = this;
this.jid = new Jid(_jid);
this.host = (host == null) ? this.jid.domain : host;
};
sys.inherits(Client, events.EventEmitter);
exports.Client = Client;