Forgot the widly used ~keyname syntax in run.js

This commit is contained in:
Alexander D Brown 2011-11-10 18:59:25 +00:00
parent 4d53a481bd
commit 35679ac19e

7
run.js
View File

@ -100,11 +100,12 @@ DBot.prototype.reloadModules = function() {
} else {
var q = data.message.valMatch(/^~([\d\w\s]*)/, 2);
if(q) {
key = q[1].trim().toLowerCase();
q[1] = q[1].tirm();
key = q[1].toLowerCase();
if(this.db.quoteArrs.hasOwnProperty(key)) {
this.say(data.channel, key + ': ' + this.db.quoteArrs[key].random());
this.say(data.channel, q[1] + ': ' + this.db.quoteArrs[key].random());
} else {
this.say(data.channel, 'Nobody loves ' + key);
this.say(data.channel, 'Nobody loves ' + q[1]);
}
}
}