A multi-channel (and eventually multi-server) IRC bot built with Node.js.
- Please don't abuse the mongoDB credentials. I'm too lazy to hide them.
- You should change the bot's nick and owner.
Requires MongoDB
- Create your own
config.jsfromconfig.DEFAULT.js(and change the bot name) npm installnode unibot.js- Register the channel
- Install plugins
Create new plugins in lib/plugins
- Add plugins by private messaging the bot
plugin [channel] [plugin] - Remove plugins by private messaging the bot
unplug [channel] [plugin]
github.js
module.exports = function(channel){
return {
// Regular expression to match
"#([0-9]+)": function(from, matches) {
// do logic ...
channel.say('Some message'); // pass a recipient name as an optional second argument
},
"...": function(from, matches) {
...
}
};
};
register [#channel]Joins a channelunregister [#channel]Leaves a channelplugin [#channel] [plugin]Adds a plugin to a channelunplug [#channel] [plugin]Removes a plugin from a channel
Grouped by Plugin
Note: :tokens are replaced with any text after the command name. Spaces are replaced with + characters (for search-engine friendliness)
Note: :nick is replaced with the name of the user who sent the message
!remember [command] is [text with optional :tokens and :nick]Create a !command!forget [command]Delete a !command!show [command]Shows the raw !command[nick:] ![command] [tokens]Say a command