not in all messages..

This commit is contained in:
Luke Slater 2012-02-15 20:39:11 +00:00
parent e1047362a2
commit f3e31925af

4
run.js
View File

@ -108,6 +108,8 @@ DBot.prototype.reloadModules = function() {
this.save();
}
} else {
var q = data.message.valMatch(/^~([\d\w\s-]*)/, 2);
if(q) {
// See if it's similar to anything
var winnerDistance = Infinity;
var winner = false;
@ -122,8 +124,6 @@ DBot.prototype.reloadModules = function() {
if(winnerDistance < 3) {
this.say(data.channel, 'Did you mean ' + winner + '? Learn to type, hippie!');
} else { // See if there's anything in quotes
var q = data.message.valMatch(/^~([\d\w\s-]*)/, 2);
if(q) {
if(this.db.bans['*'].include(data.user)) {
this.say(data.channel, data.user +
' is banned from using this command. Commence incineration.');