forked from GitHub/dbot
Merge branch 'master' of github.com:reality/depressionbot
This commit is contained in:
commit
11decc1e60
15
run.js
15
run.js
@ -106,12 +106,17 @@ DBot.prototype.reloadModules = function() {
|
|||||||
} else {
|
} else {
|
||||||
var q = data.message.valMatch(/^~([\d\w\s]*)/, 2);
|
var q = data.message.valMatch(/^~([\d\w\s]*)/, 2);
|
||||||
if(q) {
|
if(q) {
|
||||||
q[1] = q[1].trim();
|
if(this.db.bans['*'].include(data.user)) {
|
||||||
key = this.cleanNick(q[1])
|
this.say(data.channel, data.user +
|
||||||
if(this.db.quoteArrs.hasOwnProperty(key)) {
|
' is banned from using this command. Commence incineration.');
|
||||||
this.say(data.channel, q[1] + ': ' + this.db.quoteArrs[key].random());
|
|
||||||
} else {
|
} else {
|
||||||
this.say(data.channel, 'Nobody loves ' + q[1]);
|
q[1] = q[1].trim();
|
||||||
|
key = this.cleanNick(q[1])
|
||||||
|
if(this.db.quoteArrs.hasOwnProperty(key)) {
|
||||||
|
this.say(data.channel, q[1] + ': ' + this.db.quoteArrs[key].random());
|
||||||
|
} else {
|
||||||
|
this.say(data.channel, 'Nobody loves ' + q[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user