Skip to content

Commit

Permalink
tweak!: "kick all" now requires the "control.server" perms (closes #379)
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Jan 8, 2024
1 parent bdab28e commit c2b2b3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/webroutes/fxserver/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default async function FXServerCommands(ctx: AuthedCtx) {

//==============================================
} else if (action == 'kick_all') {
if (!ensurePermission(ctx, 'players.kick')) return false;
if (!ensurePermission(ctx, 'control.server')) return false;
let cmd;
if (parameter.length) {
cmd = formatCommand('txaKickAll', parameter);
Expand All @@ -110,7 +110,7 @@ export default async function FXServerCommands(ctx: AuthedCtx) {
ctx.admin.logCommand(cmd);
await fxRunner.srvCmdBuffer(cmd);
return ctx.send<ApiToastResp>({
type: 'warning',
type: 'success',
msg: 'Kick All command sent.',
});

Expand Down

0 comments on commit c2b2b3b

Please sign in to comment.