From a074779441b38b15bfd85a0978603d6fe0add0f0 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 6 Mar 2013 13:55:35 +0000 Subject: [PATCH] add basic --- modules/rc/config.json | 3 +++ modules/rc/rc.js | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 modules/rc/config.json create mode 100644 modules/rc/rc.js diff --git a/modules/rc/config.json b/modules/rc/config.json new file mode 100644 index 0000000..4e47107 --- /dev/null +++ b/modules/rc/config.json @@ -0,0 +1,3 @@ +{ + "port":1337 +} diff --git a/modules/rc/rc.js b/modules/rc/rc.js new file mode 100644 index 0000000..d25a99d --- /dev/null +++ b/modules/rc/rc.js @@ -0,0 +1,27 @@ +/** + * Module Name: Link + * Description: Stores recent channel rcs, with commands to retrieve + * information about rcs. + */ +var dgram = require('dgram'); + +var rc = function(dbot) { + var server = dgram.createSocket("udp4"); + + server.on("message", function(msg, rinfo) { + console.log(msg.toString()); + }); + + server.bind(dbot.config.rc.port); + + + var commands = { + }; + this.commands = commands; + + this.on = 'PRIVMSG'; +}; + +exports.fetch = function(dbot) { + return new rc(dbot); +};