0.0.3 • Published 13 years ago
pr0kbot v0.0.3
pr0kbot
An IRC bot for #pr0k, written in node, using Redis.
Installation requirements
Running bot
- Clone this repository:
git clone https://github.com/Ond/pr0kbot- Modify
config.jsonto your desire. - Run server:
node runPass an argument to run for separate configuration file.
Configuration options
Modify configuration in config.json
networkDesired network, e.g.irc.synirc.netportPort, e.g.6667nick_nameDesired nick, e.g.blazerboy420user_nameDesired username, e.g.blazerreal_nameDesired real name, e.g.Chauncey BiggumsautojoinList of channels to autojoin, e.g.[ '#mychannel' ]logWhether or not to log input / output. Option may be booleantrue / falseor a stringin / out.
Commands
writeWrites raw commands to the servermsgSends PRIVMSG to channel or usernoticeSends NOTICE to channel or userjoinJoins channel
Events
You may listen for any of these events. Also support for arbitrary modes, defined +mode -mode e.g. +v
connectnoticeserver noticechannel noticejoinpartquitmsgserver msgchannel msgmodechannel modeuser modemuteunmuteinviteonlydeinviteonlyvoicedevoicehalfopdehalfopopdeopbanunban
Modules
pr0kbot automatically loads modules from the /modules directory. There are two very simple module formats. For an example, see the default ping module.
module.exports = {
event1:function() {
/* handle event */
},
event2:function() {
/* handle event */
}
};And the more liberal:
module.exports = function(con) {
this.on('event1', function() {
/* handle event */
})
this.on('event2', function() {
/* handle event */
})
}