comparison lightstring.js @ 51:63c1c8bc8c19

Add plugin namespaces to Lightstring.stanzas and Lightstring.Connection methodes.
author Sonny Piers <sonny.piers@gmail.com>
date Wed, 01 Feb 2012 03:16:41 +0100
parents 770bb8460df8
children 0b7dd59e264a
comparison
equal deleted inserted replaced
50:770bb8460df8 51:63c1c8bc8c19
393 393
394 for (var ns in plugin.namespaces) 394 for (var ns in plugin.namespaces)
395 Lightstring.ns[ns] = plugin.namespaces[ns]; 395 Lightstring.ns[ns] = plugin.namespaces[ns];
396 396
397 for (var stanza in plugin.stanzas) 397 for (var stanza in plugin.stanzas)
398 Lightstring.stanzas[stanza] = plugin.stanzas[stanza]; 398 Lightstring.stanzas[name][stanza] = plugin.stanzas[stanza];
399 399
400 for (var handler in plugin.handlers) 400 for (var handler in plugin.handlers)
401 this.on(handler, plugin.handlers[handler]); 401 this.on(handler, plugin.handlers[handler]);
402 402
403 for (var method in plugin.methods) 403 for (var method in plugin.methods)
404 this.methods[method] = plugin.methods[method]; 404 this[name][method] = plugin.methods[method];
405 } 405 }
406 }, 406 },
407 /** 407 /**
408 * @function Emits an event. 408 * @function Emits an event.
409 * @param {String} aName The event name. 409 * @param {String} aName The event name.