Skip to content

jdduarte/rulio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Barebones module based irc bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%