Skip to content

Instantly share code, notes, and snippets.

@keverw
Created May 4, 2012 23:12
Show Gist options
  • Save keverw/2598281 to your computer and use it in GitHub Desktop.
Save keverw/2598281 to your computer and use it in GitHub Desktop.
Tiny node.js bot
var irc = require('irc');
console.log('IRC Bot Started...');
var client = new irc.Client('irc.ztecnet.net', 'JustinBieber', {
channels: ['#ztecnet'],
});
client.addListener('message#ztecnet', function (from, message) {
console.log(from + ' => #ztecnet: ' + message);
if (from == 'Keverw')
{
client.say('#ztecnet', "I'm a bot, " + from + ".");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment