Last active
August 29, 2015 14:00
-
-
Save lkptrzk/11057589 to your computer and use it in GitHub Desktop.
node irc 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
// quick sketch based on http://davidwalsh.name/nodejs-irc | |
var Irc = require('irc') | |
var settings = { | |
channels: [ | |
'#node.js' | |
], | |
server: 'irc.freenode.net', | |
botName: 'idlebot' | |
} | |
var bot = new Irc.Client(settings.server, settings.botName, { | |
channels: settings.channels | |
}) | |
bot.addListener('message', function (from, to, text, message) { | |
console.log(Date()) | |
console.dir(message) | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment