Skip to content

Instantly share code, notes, and snippets.

@WA9ACE
Created January 17, 2012 17:23
Show Gist options
  • Save WA9ACE/1627608 to your computer and use it in GitHub Desktop.
Save WA9ACE/1627608 to your computer and use it in GitHub Desktop.
var net = require('net');
var irc = {};
irc.socket = new net.Socket();
irc.socket.on('connect', function()
{
console.log('Established connection, registering');
setTimeout(function()
{
irc.socket.write('NICK UberBot_js');
irc.socket.write('USER callum 8 * :Node.js IRC bot');
irc.socket.write('JOIN: #kindlefire');
}, 1000);
});
irc.socket.setEncoding('ascii');
irc.socket.setNoDelay();
irc.socket.connect(6667, 'irc.andirc.net');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment