diff --git a/chat-commands.js b/chat-commands.js index 210c09044f..6dc428da2b 100644 --- a/chat-commands.js +++ b/chat-commands.js @@ -675,6 +675,10 @@ function parseCommandLocal(user, cmd, target, room, socket, message) { emit(socket, 'console', 'That moderated chat setting is unrecognized.'); return false; } + if (target !== '+' && !user.can('modchatall')) { + emit(socket, 'console', '/modchat - Access denied for setting higher than +.'); + return false; + } config.modchat = target; break; } @@ -692,8 +696,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) { case 'declare': if (!target) return parseCommand(user, '?', cmd, room, socket); - // announce is used because leaders and up can already announce and i didn't want to try and mess with permissions - if (!user.can('announce')) { + if (!user.can('declare')) { emit(socket, 'console', '/declare - Access denied.'); return false; } @@ -706,8 +709,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) { case 'announce': case 'wall': if (!target) return parseCommand(user, '?', cmd, room, socket); - // mute is used because drivers and up can already mute and i didn't want to try and mess with permissions - if (!user.can('mute')) { + if (!user.can('announce')) { emit(socket, 'console', '/announce - Access denied.'); return false; }