|  |  |  | @ -25,6 +25,7 @@ var Client = function(_jid, password, host) { | 
			
		
	
		
			
				
					|  |  |  |  | 	this.rooms = {}; | 
			
		
	
		
			
				
					|  |  |  |  | 	this._iq = 0; | 
			
		
	
		
			
				
					|  |  |  |  | 	this._iqCallback = {}; | 
			
		
	
		
			
				
					|  |  |  |  | 	this.presences = {}; | 
			
		
	
		
			
				
					|  |  |  |  | 	this.roster = {}; | 
			
		
	
		
			
				
					|  |  |  |  | 	this.xmpp = new xmpp.Client({ | 
			
		
	
		
			
				
					|  |  |  |  | 		host: this.host, | 
			
		
	
	
		
			
				
					|  |  |  | @ -57,7 +58,7 @@ var Client = function(_jid, password, host) { | 
			
		
	
		
			
				
					|  |  |  |  | 			if(fromm[1] == 'conference.' + this.jid.domain) { | 
			
		
	
		
			
				
					|  |  |  |  | 				jabber.rooms[fromm[0]].emit('presence', stanza); | 
			
		
	
		
			
				
					|  |  |  |  | 			} else { | 
			
		
	
		
			
				
					|  |  |  |  | 				jabber.emit('presence', stanza); | 
			
		
	
		
			
				
					|  |  |  |  | 				jabber.emit('presence', stanza.attrs.from, stanza); | 
			
		
	
		
			
				
					|  |  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		if(stanza.name == 'message') { | 
			
		
	
	
		
			
				
					|  |  |  | @ -85,6 +86,9 @@ var Client = function(_jid, password, host) { | 
			
		
	
		
			
				
					|  |  |  |  | 	this.addListener('iqResult', function(id, stanza){ | 
			
		
	
		
			
				
					|  |  |  |  | 		jabber._iqCallback[id].call(jabber, stanza); | 
			
		
	
		
			
				
					|  |  |  |  | 	}); | 
			
		
	
		
			
				
					|  |  |  |  | 	this.addListener('presence', function(from, stanza) { | 
			
		
	
		
			
				
					|  |  |  |  | 		jabber.presences[from] = stanza.attrs.type; | 
			
		
	
		
			
				
					|  |  |  |  | 	}); | 
			
		
	
		
			
				
					|  |  |  |  | }; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | sys.inherits(Client, events.EventEmitter); | 
			
		
	
	
		
			
				
					|  |  |  | 
 |