rulio

0.1.0-2 • Public • Published

Rulio

A Barebones module based irc bot.

====

Install

git clone git://github.com/Soarez/rulio.git
cd rulio
npm install
cp config.json.example config.json

Edit config.json to your needs.

Run

node server

Modules

Rulio works with modules. Modules should export a function with two arguments, an instace of node-irc (you should check the API) and an object with Rulio's configuration. Client.

Rulio modules should be npm modules.

Example

Here is a module that echos private messages.

On dedicated folder, create a file named echo.js with this:

module.exports = function(client) {
  client.addListener('pm', function (nick, text) {
     client.say(nick, text);
  });
};

Use npm init to have npm create a package.json, and when set name to rulio-echo and main to echo.js.

Now the module can be published with npm publish and other rulio users could start using it by using npm install rulio-echo. But before publishing we want to test it, and make changes to it. So we use use npm link to debug:

On the module folder:

npm link

On rulio's folder:

npm link rulio-echo

This way, npm will symlink the modules folder to a folder named rulio-echo inside node_modules. This way, the module can be require()d like any installed npm module.

Don't forget to publish your rulio module so we can use it too :) You should add it to our list of rulio modules in the wiki.

Loading modules

Load it in rulio's config.json, by adding it to modules.

...
"modules": [
  "rulio-echo"
 ]
... 

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i rulio

Weekly Downloads

1

Version

0.1.0-2

License

none

Last publish

Collaborators

  • jdduarte