lib/bot.js
function() {
    var self = this;

    self.jabber.on('data', function(buffer) {
      console.log('  IN > ' + buffer.toString());
    });

    var origSend = this.jabber.send;
    self.jabber.send = function(stanza) {
      console.log(' OUT > ' + stanza);
      return origSend.call(self.jabber, stanza);
    };
  }
function() {
    var self = this;

    self.jabber.on('data', function(buffer) {
      console.log('  IN > ' + buffer.toString());
    });

    var origSend = this.jabber.send;
    self.jabber.send = function(stanza) {
      console.log(' OUT > ' + stanza);
      return origSend.call(self.jabber, stanza);
    };
  }
function ( ) { var self = this ; self . jabber . on ( 'data' , function ( buffer ) { console . log ( '  IN > ' + buffer . toString ( ) ) ; } ) ; var origSend = this . jabber . send ; self . jabber . send = function ( stanza ) { console . log ( ' OUT > ' + stanza ) ; return origSend . call ( self . jabber , stanza ) ; } ; }
Helper function that overrides the XMPP `send` method to allow incoming and outgoing debugging.
Helper function that overrides the XMPP send method to allow incoming and outgoing debugging .