3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 19:52:36 +01:00

fix splicing category out

This commit is contained in:
Luke Slater 2012-02-14 18:17:31 +00:00
parent c844125355
commit 770b66488d

View File

@ -34,10 +34,11 @@ var drama = function(dbot) {
'~rtrain': function(data, params) {
if(data.user == dbot.admin) {
var category = params[1];
params.splice(0, 2);
var msg = params.join(' ');
bayes.train(msg, params[1]);
dbot.say(data.channel, '\'' + msg + '\' classified as \'' + params[1] + '\'');
bayes.train(msg, category);
dbot.say(data.channel, '\'' + msg + '\' classified as \'' + category + '\'');
}
}
}