Merge pull request #1478 from Morfent/trivia

Trivia plugin: actually fix /trivia add permissions
This commit is contained in:
Guangcong Luo 2015-01-28 16:25:39 -06:00
commit d68440d896

View File

@ -411,7 +411,7 @@ var commands = {
// question database modifying commands
submit: 'add',
add: function (target, room, user, connection, cmd) {
if (room.id !== 'questionworkshop' || (cmd === 'triviaadd' && !this.can('mute', null, room)) || !target) return false;
if (room.id !== 'questionworkshop' || (cmd === 'add' && !this.can('mute', null, room)) || !target) return false;
target = target.split('|');
if (target.length !== 3) return this.sendReply('Invalid arguments specified. View /trivia help qcommands for more information.');