 
   online: =>
     console.log 'Hubot XMPP client online'
-    
+
     @client.send new Xmpp.Element('presence', type: 'available' )
       .c('show').t('chat')
 


    # ignore our own messages
    return if @options.username in stanza.attrs.from
      
    # ignore empty bodies (i.e., topic changes -- maybe watch these someday)
    body = stanza.getChild 'body'
    return unless body
    
    message = body.getText()
    
    [room, from] = stanza.attrs.from.split '/'
    user = new Robot.User from, {
      room: room
      type: stanza.attrs.type
    }
    
    @receive new Robot.TextMessage user, message

  send: (user, strings...) ->

        .c('history', seconds: 1 )) # prevent the server from confusing us with old messages
                                    # and it seems that servers don't reliably support maxchars
                                    # or zero values

    # send raw whitespace for keepalive
    setInterval =>
      @client.send ' '
    , @options.keepaliveInterval
