From 4aed2a700ca938be99f93bd31805f554007d8da6 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Wed, 15 Feb 2012 21:01:31 +0000 Subject: [PATCH] classify --- modules/drama.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/drama.js b/modules/drama.js index 1e9ac31..04161d2 100644 --- a/modules/drama.js +++ b/modules/drama.js @@ -42,8 +42,10 @@ var drama = function(dbot) { dbot.say(data.channel, '\'' + msg + '\' classified as \'' + category + '\''); }, - '~classify': function() { - bayes.classify(data.message, function(category) { + '~classify': function(data, params) { + params.splice(0, 1); + var msg = params.join(' '); + bayes.classify(msg, function(category) { dbot.say(data.channel, 'Classified as: ' + category + '!'); }.bind(this)); }