From 1886a4eae42d0c76a2405b75170daa1ed8251227 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 2 Jun 2012 02:29:09 +0200 Subject: o Trying to use @einaros' dynobot stuff. --- echo-bot.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 echo-bot.js (limited to 'echo-bot.js') diff --git a/echo-bot.js b/echo-bot.js new file mode 100644 index 0000000..2d721e4 --- /dev/null +++ b/echo-bot.js @@ -0,0 +1,17 @@ +var irc = function() { + var Proxy = require('dynobot/proxy'); + var Channel = require('dynobot/channel'); + var IRC = require('./node_modules/node-irc/irc').IRC; + + var channel = new Channel(); + return new Proxy(IRC.prototype, 'irc', channel); +}(); + +irc.on('privmsg', function(nick, channel, message) { + console.log('privmsg: ', arguments); + irc.notice(channel, nick + ': ' + message); +}); + +console.log("echo bot started"); + +// process.exit(0); -- cgit v1.2.3