# HG changeset patch # User Sonny Piers # Date 1328137234 -3600 # Node ID e1ccfb58022875a396cb9a19ef8cd1b924379be5 # Parent 1c8f326fe3ef54b8cb4a387f4920f62f8843e9a8 Replaces that by Conn. diff --git a/lightstring.js b/lightstring.js --- a/lightstring.js +++ b/lightstring.js @@ -17,9 +17,6 @@ */ -/** - * @namespace No code from lightstring should be callable outside this namespace/scope. - */ var Lightstring = { /** * @namespace Holds XMPP namespaces. diff --git a/plugins/ANONYMOUS.js b/plugins/ANONYMOUS.js --- a/plugins/ANONYMOUS.js +++ b/plugins/ANONYMOUS.js @@ -48,7 +48,7 @@ Lightstring.plugins['ANONYMOUS'] = { ); }, 'features': function (stanza) { - var that = this; + var Conn = this; //TODO check if bind supported var bind = "" + @@ -60,14 +60,14 @@ Lightstring.plugins['ANONYMOUS'] = { //Success function(stanza) { //Session http://xmpp.org/rfcs/rfc3921.html#session - that.jid = new Lightstring.JID(stanza.DOM.textContent); + Conn.jid = new Lightstring.JID(stanza.DOM.textContent); - that.send( + Conn.send( "" + "" + "", function() { - that.emit('connected'); + Conn.emit('connected'); } ); }, diff --git a/plugins/DIGEST-MD5.js b/plugins/DIGEST-MD5.js --- a/plugins/DIGEST-MD5.js +++ b/plugins/DIGEST-MD5.js @@ -48,7 +48,7 @@ Lightstring.plugins['DIGEST-MD5'] = { ); }, 'features': function (stanza) { - var that = this; + var Conn = this; //TODO check if bind supported var bind = "" + @@ -61,13 +61,13 @@ Lightstring.plugins['DIGEST-MD5'] = { //Success function(stanza) { //Session http://xmpp.org/rfcs/rfc3921.html#session - that.jid = new Lightstring.JID(stanza.DOM.textContent); - that.send( + Conn.jid = new Lightstring.JID(stanza.DOM.textContent); + Conn.send( "" + "" + "", function() { - that.emit('connected'); + Conn.emit('connected'); } ); }, diff --git a/plugins/PLAIN.js b/plugins/PLAIN.js --- a/plugins/PLAIN.js +++ b/plugins/PLAIN.js @@ -53,7 +53,7 @@ Lightstring.plugins['PLAIN'] = { ); }, 'features': function (stanza) { - var that = this; + var Conn = this; //TODO check if bind supported var bind = "" + @@ -66,13 +66,13 @@ Lightstring.plugins['PLAIN'] = { //Success function(stanza) { //Session http://xmpp.org/rfcs/rfc3921.html#session - that.jid = new Lightstring.JID(stanza.DOM.textContent); - that.send( + Conn.jid = new Lightstring.JID(stanza.DOM.textContent); + Conn.send( "" + "" + "", function() { - that.emit('connected'); + Conn.emit('connected'); } ); },