Pure JS XMPP library for NodeJS
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
package.json

README.md

Jacasr

About

Pure JS XMPP library for NodeJS

Jacasr is a library for NodeJS that implements the basics of xmpp protocol

Requirements

Grab the code

Check out source with

$ git clone git://github.com/tdebarochez/jacasr.git

Installation

npm install jacasr

Usage

You can find a full featured application with LePote bot. However this is the basic usage :

    var jacasr = require('jacasr');
    var conf = {login: 'user',
                password: 'pass',
                domain: 'server.com'};
    var client = new jacasr.Client(conf);
    client.on('message', function (from, message) {
      if (/^hi/i.exec(message)) {
        this.push(from, 'Hi there');
      }
      else if (/^how are you/i.exec(message)) {
        this.push(from, 'Fine and you ?');
      }
      else if (/bye/i.exec(message)) {
        this.push(from, 'Good bye !');
      }
    });

API

For the full API, take a look at documentation.

License

Jacasr is licensed under the terms of the MIT License, see the included LICENSE file.