diff options
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); |