mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 22:39:26 +01:00
ban on thing
This commit is contained in:
parent
d6eb37b226
commit
0ad2f46abd
21
run.js
21
run.js
@ -104,14 +104,19 @@ DBot.prototype.reloadModules = function() {
|
|||||||
this.save();
|
this.save();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var q = data.message.valMatch(/^~([\d\w\s]*)/, 2);
|
if(this.db.bans['*'].include(data.user)) {
|
||||||
if(q) {
|
this.say(data.channel, data.user +
|
||||||
q[1] = q[1].trim();
|
' is banned from using this command. Commence incineration.');
|
||||||
key = this.cleanNick(q[1])
|
} else {
|
||||||
if(this.db.quoteArrs.hasOwnProperty(key)) {
|
var q = data.message.valMatch(/^~([\d\w\s]*)/, 2);
|
||||||
this.say(data.channel, q[1] + ': ' + this.db.quoteArrs[key].random());
|
if(q) {
|
||||||
} else {
|
q[1] = q[1].trim();
|
||||||
this.say(data.channel, 'Nobody loves ' + q[1]);
|
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