Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
var irc = require('irc');
var config = {
server: 'irc.freenode.net',
name: 'testBot',
channels: '#testRoom'
};
var bot = new irc.Client(config.server, config.name, { channels: [config.channels] });
bot.addListener('error', function(err){
console.log('error: ' + err);
});
bot.addListener('message', function(to, from, msg){
console.log(from + ': ' + msg);
});
bot.join(config.channels, function(){
bot.say(config.channels, 'Hello!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment