totallymike/ircnode — pull request #52 by thatvalterguy (2012-12-27 20:26:24+00:00)
Title: Reloading plugins on file change

Adds plugin reloading on plugin file change and persistent storage for storing data when reloading. Closes #9.

```javascript
// Simple example plugin to demonstrate new functions.

var irc = global.irc;

var cmd_handler = function (act) {
exports.store.countVar++;
irc.privmsg(act.source, 'Hi, #' + exports.store.countVar + '!');
};

// The name of plugin. Associated with plugin's data.
exports.name = 'hello';
// All commands and their respective handlers.
exports.commands = { 'hello': cmd_handler };
// Plugin's data which needs to be retained.
exports.store = { 'countVar': 0 };
```