changeset 68:e1ccfb580228

Replaces that by Conn.
author Sonny Piers <sonny.piers@gmail.com>
date Thu, 02 Feb 2012 00:00:34 +0100
parents 1c8f326fe3ef
children 03ccf507ecda
files lightstring.js plugins/ANONYMOUS.js plugins/DIGEST-MD5.js plugins/PLAIN.js
diffstat 4 files changed, 12 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- 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 =
         "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
@@ -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(
             "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
               "<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>" +
             "</iq>",
             function() {
-              that.emit('connected');
+              Conn.emit('connected');
             }
           );
         },
--- 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 =
         "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
@@ -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(
             "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
               "<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>" +
             "</iq>",
             function() {
-              that.emit('connected');
+              Conn.emit('connected');
             }
           );
         },
--- 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 =
         "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
@@ -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(
             "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
               "<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>" +
             "</iq>",
             function() {
-              that.emit('connected');
+              Conn.emit('connected');
             }
           );
         },