3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00

valmatch correction

This commit is contained in:
Luke Slater 2011-11-04 16:37:21 +00:00
parent 119d0b306e
commit 23653665c2

View File

@ -5,7 +5,7 @@ var spelling = function(dbot) {
return { return {
'listener': function(data, params) { 'listener': function(data, params) {
var q = data.message.valMatch(/^\*\*?([\d\w\s]*)/, 2); var q = data.message.valMatch(/^\*\*?([\d\w\s]*)/, 2);
var otherQ = data.message.valMatch(/^([\d\w\s]*): \*\*?([\d\w\s]*)/); var otherQ = data.message.valMatch(/^([\d\w\s]*): \*\*?([\d\w\s]*)/, 3);
if(q) { if(q) {
var correction = q[1]; var correction = q[1];
var candidates = last[data.channel][data.user].split(' '); var candidates = last[data.channel][data.user].split(' ');