Created
May 4, 2012 23:12
-
-
Save keverw/2598281 to your computer and use it in GitHub Desktop.
Tiny node.js bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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