diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-06-02 02:29:09 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-06-02 02:29:09 +0200 |
commit | 1886a4eae42d0c76a2405b75170daa1ed8251227 (patch) | |
tree | f5fc6e798e9b155e83be933737c9c17049bf405c /echo-bot.js | |
parent | a105b34ab53963ab651810f33caa2ee51869b1c7 (diff) | |
download | dynobot-irc-1886a4eae42d0c76a2405b75170daa1ed8251227.tar.gz dynobot-irc-1886a4eae42d0c76a2405b75170daa1ed8251227.tar.bz2 dynobot-irc-1886a4eae42d0c76a2405b75170daa1ed8251227.tar.xz dynobot-irc-1886a4eae42d0c76a2405b75170daa1ed8251227.zip |
o Trying to use @einaros' dynobot stuff.
Diffstat (limited to 'echo-bot.js')
-rw-r--r-- | echo-bot.js | 17 |
1 files changed, 17 insertions, 0 deletions
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); |