From 66611c92a373d9241888ed6144352e5dff290d83 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Fri, 15 Feb 2013 17:28:54 +0000 Subject: [PATCH] ~link to use event input not params [Fix #273] --- modules/quotes/commands.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/quotes/commands.js b/modules/quotes/commands.js index c99fd01..24c7ba7 100644 --- a/modules/quotes/commands.js +++ b/modules/quotes/commands.js @@ -192,7 +192,7 @@ var commands = function(dbot) { }, '~link': function(event) { - var key = event.params[1].trim().toLowerCase(); + var key = event.input[1].toLowerCase(); if(_.has(quotes, key)) { event.reply(dbot.t('quote_link', { 'category': key, @@ -214,6 +214,7 @@ var commands = function(dbot) { commands['~rm'].regex = [/^~rm ([\d\w\s-]+?)[ ]?=[ ]?(.+)$/, 3]; commands['~rmlast'].regex = [/^~rmlast ([\d\w\s-]*)/, 2]; commands['~qadd'].regex = [/^~qadd ([\d\w\s-]+?)[ ]?=[ ]?(.+)$/, 3]; + commands['~link'].regex = [/^~link ([\d\w\s-]*)/, 2]; commands['~rmconfirm'].access = 'moderator'; commands['~rmdeny'].access = 'moderator';