Skip to content

Instantly share code, notes, and snippets.

@thebigbad
Created December 6, 2010 20:19
Show Gist options
  • Select an option

  • Save thebigbad/730875 to your computer and use it in GitHub Desktop.

Select an option

Save thebigbad/730875 to your computer and use it in GitHub Desktop.
irc bot for ci
var jerk = require('jerk');
var http = require('http');
var options = {
server: 'eng.borderstylo.int',
nick: 'SnakeEyes',
channels: ['#rd', '#clients']
};
var irc = jerk(function (j) {}).connect(options);
http.createServer(function (req, res) {
req.setEncoding('utf8');
req.on('data', function (data) {
var room = req.url.replace(/\//, '');
irc.say('#' + room, '\x032' + data);
});
req.on('end', function () {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
});
}).listen(8124);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment