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

dont bother with a quote if the key begins with _. So I can perform ~_~ unmolested in channel.

This commit is contained in:
Luke Slater 2012-07-09 19:45:45 +01:00
parent a144f64094
commit c0c235f045
3 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,4 @@
var kick = function(dbot) {
var dbot = dbot;
var commands = {
// Give the number of times a given user has been kicked and has kicked
// other people.

View File

@ -46,6 +46,7 @@ var quotes = function(dbot) {
altKey = key.replace(/ /g, '_');
}
if(key.charAt(0) !== '_') { // lol
if(quotes.hasOwnProperty(key)) {
event.reply(key + ': ' + interpolatedQuote(key));
} else if(quotes.hasOwnProperty(altKey)) {
@ -53,6 +54,7 @@ var quotes = function(dbot) {
} else {
event.reply(dbot.t('category_not_found', {'category': key}));
}
}
},
// Shows a list of the biggest categories

View File

@ -164,13 +164,13 @@ Object.prototype.isArray = function(obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
};
/*Object.prototype.withAll = function(fun) {
Object.prototype.withAll = function(fun) {
for(key in this) {
if(this.hasOwnProperty(key)){
fun(key, this[key]);
}
}
};*/
};
Object.prototype.length = function() {
var l = 0;