mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 19:52:36 +01:00
add basic
This commit is contained in:
parent
e648068b1c
commit
a074779441
3
modules/rc/config.json
Normal file
3
modules/rc/config.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"port":1337
|
||||
}
|
27
modules/rc/rc.js
Normal file
27
modules/rc/rc.js
Normal file
@ -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);
|
||||
};
|
Loading…
Reference in New Issue
Block a user