mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
prevent multiple yes votes by using votequiet fallback (lol)
This commit is contained in:
parent
fe8168a237
commit
8fe032579d
@ -344,6 +344,7 @@ var commands = function(dbot) {
|
|||||||
event.reply('A votequiet attempt has already been made on this user in the last 10 minutes.');
|
event.reply('A votequiet attempt has already been made on this user in the last 10 minutes.');
|
||||||
} else {
|
} else {
|
||||||
var vq = this.voteQuiets[user.id]
|
var vq = this.voteQuiets[user.id]
|
||||||
|
if(!_.include(vq.yes, event.rUser.primaryNick)) {
|
||||||
vq.yes.push(event.rUser.primaryNick);
|
vq.yes.push(event.rUser.primaryNick);
|
||||||
|
|
||||||
event.reply('There is already a votequiet attempt active for this user, adding yes vote to existing poll.');
|
event.reply('There is already a votequiet attempt active for this user, adding yes vote to existing poll.');
|
||||||
@ -355,6 +356,9 @@ var commands = function(dbot) {
|
|||||||
event.reply(response);
|
event.reply(response);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
event.reply('There is already a votequiet attempt active for this user, and you already voted yes!');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user