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

Changed 9999999 to Infinity

This commit is contained in:
Dafydd Francis 2012-01-01 18:47:50 +00:00
parent 2b5fc780dc
commit 32e21067f5

View File

@ -10,7 +10,7 @@ var spelling = function(dbot) {
var correction = q[1];
var candidates = last[data.channel][data.user].split(' ');
var winner = false;
var winnerDistance = 99999999; //urgh fix later
var winnerDistance = Infinity; //urgh fix later
for(var i=0;i<candidates.length;i++) {
var distance = String.prototype.distance(correction, candidates[i]);
@ -32,7 +32,7 @@ var spelling = function(dbot) {
var correction = otherQ[2];
var candidates = last[data.channel][otherQ[1]].split(' ');
var winner = false;
var winnerDistance = 99999999; //urgh fix later
var winnerDistance = Infinity; //urgh fix later
for(var i=0;i<candidates.length;i++) {
var distance = String.prototype.distance(correction, candidates[i]);