diff 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
line wrap: on
line diff
--- a/lightstring.js
+++ b/lightstring.js
@@ -395,13 +395,13 @@ Lightstring.Connection.prototype = {
         Lightstring.ns[ns] = plugin.namespaces[ns];
 
       for (var stanza in plugin.stanzas)
-        Lightstring.stanzas[stanza] = plugin.stanzas[stanza];
+        Lightstring.stanzas[name][stanza] = plugin.stanzas[stanza];
 
       for (var handler in plugin.handlers)
         this.on(handler, plugin.handlers[handler]);
 
       for (var method in plugin.methods)
-        this.methods[method] = plugin.methods[method];
+        this[name][method] = plugin.methods[method];
     }
   },
   /**