Created
December 6, 2010 20:19
-
-
Save thebigbad/730875 to your computer and use it in GitHub Desktop.
irc bot for ci
This file contains hidden or 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 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