From 3beee89f00bc297a91929321b7a4c882cd92eebc Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Tue, 18 Feb 2014 18:47:43 +0000 Subject: [PATCH] Update udp.js --- modules/udp/udp.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/udp/udp.js b/modules/udp/udp.js index b7d9b76..52caac6 100644 --- a/modules/udp/udp.js +++ b/modules/udp/udp.js @@ -10,11 +10,11 @@ var udp = function(dbot) { server.on("message", function(msg, msginfo) { var message = msg.toString(); console.log(message); - if (msginfo.address == dbot.config.udp.address) { - dbot.say(dbot.config.udp.server, dbot.config.udp.channel, message); + if (msginfo.address == this.config.address) { + dbot.say(this.config.server, this.config.channel, message); } - }); - server.bind(dbot.config.udp.port); + }.bind(this)); + server.bind(this.config.port); }; exports.fetch = function(dbot) {