1
0
Fork 0
master
Matthieu Lalonde 15 years ago committed by Mathieu Lecarme
parent fdce7f1651
commit c0a68b4a5f

@ -28,7 +28,7 @@ var Client = function(params) {
process.exit(1);
});
this.xmpp.addListener('stanza', function(stanza) {
sys.debug('STANZA: '[jabber.color] + stanza);
sys.debug('STANZA: '[jabber.color] + ('<' + stanza.name + '> ').bold[jabber.color] + stanza);
if(stanza.name == 'iq') {
if(stanza.attrs.type == 'result') {
jabber._debug('IQ result: ' + stanza);
@ -72,6 +72,12 @@ var Client = function(params) {
this.addListener('presence', function(from, stanza) {
jabber.presences[from] = stanza.attrs.type;
});
this.addListener('iq', function(stanza) {
var query = stanza.getChild('query', 'http://jabber.org/protocol/disco#info');
if(query != null) {
sys.debug((stanza.attrs.from + " wont to disco!")[jabber.color]);
}
});
};
sys.inherits(Client, events.EventEmitter);

Loading…
Cancel
Save