Created
September 24, 2014 18:15
-
-
Save AlisamfP/5c65286e641b7ff768c2 to your computer and use it in GitHub Desktop.
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'); | |
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