From bf2cff6ebac6da64f1d4622929dcb0b1c6f0a213 Mon Sep 17 00:00:00 2001 From: Daniel Dowling Date: Thu, 31 Jan 2013 15:41:16 +0000 Subject: [PATCH] Cleaned up code based on feedback. --- modules/link/link.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/link/link.js b/modules/link/link.js index cf26bc6..6c987f6 100644 --- a/modules/link/link.js +++ b/modules/link/link.js @@ -41,10 +41,8 @@ var link = function(dbot) { data = JSON.parse(body); comicId = data.num; comicId = (Math.floor(Math.random() * comicId) + 1); - event.message = '~xkcd ' + comicId; - event.action = 'PRIVMSG'; - event.params = event.message.split(' '); - dbot.instance.emit(event); + event.params[1] = comicId; + dbot.commands['~xkcd'](event); } }); }else {