forked from GitHub/dbot
dont bother with a quote if the key begins with _. So I can perform ~_~ unmolested in channel.
This commit is contained in:
parent
a144f64094
commit
c0c235f045
@ -1,6 +1,4 @@
|
|||||||
var kick = function(dbot) {
|
var kick = function(dbot) {
|
||||||
var dbot = dbot;
|
|
||||||
|
|
||||||
var commands = {
|
var commands = {
|
||||||
// Give the number of times a given user has been kicked and has kicked
|
// Give the number of times a given user has been kicked and has kicked
|
||||||
// other people.
|
// other people.
|
||||||
|
@ -46,12 +46,14 @@ var quotes = function(dbot) {
|
|||||||
altKey = key.replace(/ /g, '_');
|
altKey = key.replace(/ /g, '_');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(quotes.hasOwnProperty(key)) {
|
if(key.charAt(0) !== '_') { // lol
|
||||||
event.reply(key + ': ' + interpolatedQuote(key));
|
if(quotes.hasOwnProperty(key)) {
|
||||||
} else if(quotes.hasOwnProperty(altKey)) {
|
event.reply(key + ': ' + interpolatedQuote(key));
|
||||||
event.reply(altKey + ': ' + interpolatedQuote(altKey));
|
} else if(quotes.hasOwnProperty(altKey)) {
|
||||||
} else {
|
event.reply(altKey + ': ' + interpolatedQuote(altKey));
|
||||||
event.reply(dbot.t('category_not_found', {'category': key}));
|
} else {
|
||||||
|
event.reply(dbot.t('category_not_found', {'category': key}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -164,13 +164,13 @@ Object.prototype.isArray = function(obj) {
|
|||||||
return Object.prototype.toString.call(obj) === '[object Array]';
|
return Object.prototype.toString.call(obj) === '[object Array]';
|
||||||
};
|
};
|
||||||
|
|
||||||
/*Object.prototype.withAll = function(fun) {
|
Object.prototype.withAll = function(fun) {
|
||||||
for(key in this) {
|
for(key in this) {
|
||||||
if(this.hasOwnProperty(key)){
|
if(this.hasOwnProperty(key)){
|
||||||
fun(key, this[key]);
|
fun(key, this[key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};*/
|
};
|
||||||
|
|
||||||
Object.prototype.length = function() {
|
Object.prototype.length = function() {
|
||||||
var l = 0;
|
var l = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user