mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 19:52:36 +01:00
glee protection
This commit is contained in:
parent
d60038a852
commit
5b1fce5767
@ -9,7 +9,12 @@ var quotes = function(dbot) {
|
|||||||
if(q) {
|
if(q) {
|
||||||
key = q[1].trim().toLowerCase();
|
key = q[1].trim().toLowerCase();
|
||||||
if(quotes.hasOwnProperty(key)) {
|
if(quotes.hasOwnProperty(key)) {
|
||||||
dbot.say(data.channel, key + ': ' + quotes[key].random());
|
var output = quotes[key].random();
|
||||||
|
if(output == "glee") {
|
||||||
|
dbot.instance.send('KICK ' + data.channel + ' ' + data.user + ' :glee off dickhead');
|
||||||
|
} else {
|
||||||
|
dbot.say(data.channel, key + ': ' + output);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dbot.say(data.channel, 'Nobody loves ' + key);
|
dbot.say(data.channel, 'Nobody loves ' + key);
|
||||||
}
|
}
|
||||||
|
7
run.js
7
run.js
@ -102,7 +102,12 @@ DBot.prototype.reloadModules = function() {
|
|||||||
if(q) {
|
if(q) {
|
||||||
key = q[1].trim().toLowerCase();
|
key = q[1].trim().toLowerCase();
|
||||||
if(this.db.quoteArrs.hasOwnProperty(key)) {
|
if(this.db.quoteArrs.hasOwnProperty(key)) {
|
||||||
this.say(data.channel, key + ': ' + this.db.quoteArrs[key].random());
|
var output = this.db.quoteArrs[key].random();
|
||||||
|
if(output == "glee") {
|
||||||
|
dbot.instance.send('KICK ' + data.channel + ' ' + data.user + ' :glee off dickhead');
|
||||||
|
} else {
|
||||||
|
this.say(data.channel, key + ': ' + output);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.say(data.channel, 'Nobody loves ' + key);
|
this.say(data.channel, 'Nobody loves ' + key);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user