3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

dupe protection in realityonce

This commit is contained in:
Luke Slater 2012-08-08 16:11:22 +01:00
parent c3dbef3174
commit 40d239802d

View File

@ -247,6 +247,9 @@ var quotes = function(dbot) {
if(!dbot.db.quoteArrs.hasOwnProperty('realityonce')) {
dbot.db.quoteArrs['realityonce'] = [];
}
if(dbot.db.quoteArrs['realityonce'].include('reality ' + once[1] + '.')) {
event.reply(event.user + ': reality has already done that once.');
} else {
dbot.db.quoteArrs['realityonce'].push('reality ' + once[1] + '.');
addStack.push('realityonce');
rmAllowed = true;
@ -254,6 +257,7 @@ var quotes = function(dbot) {
}
}
}
}
},
'on': 'PRIVMSG'