dbot/modules/rc/rc.js
Douglas Gardner 8eb60552fb tidy
2013-03-06 14:17:24 +00:00

23 lines
539 B
JavaScript

/**
* Module Name: RC
* Description: Relays UDP packets, intended for
* a feed of RecentChanges on a MediaWiki install.
*/
var dgram = require('dgram');
var rc = function(dbot) {
var server = dgram.createSocket("udp4");
server.on("message", function(msg, rinfo) {
var message = msg.toString();
console.log(msg.toString());
// dbot.say(dbot.config.rc.server, dbot.config.rc.channel, message);
});
server.bind(dbot.config.rc.port);
};
exports.fetch = function(dbot) {
return new rc(dbot);
};