From ab3c03563e05fd4f0fdd34a167ad26a97c1045d7 Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:18:42 +0100 Subject: [PATCH] chore: added endmatch command --- README.MD | 1 + mapvote.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 03cd183..5cf7b33 100644 --- a/README.MD +++ b/README.MD @@ -15,6 +15,7 @@ The `MapVote` plugin for squad js based on the original version https://github.c - `!vote end` - Gently ends the current vote and announces the winner layer - `!vote restart` - Restarts voting with 6 random maps and modes - `!vote broadcast` - Broadcasts current voting results - happens every 7m automatically +- `!vote endmatch` - Ends the current match ##### Vote by modes - `!vote start *_raas` - Starts a vote with 6 layers, all RAAS diff --git a/mapvote.js b/mapvote.js index 71c151a..3d1d349 100644 --- a/mapvote.js +++ b/mapvote.js @@ -436,6 +436,10 @@ export default class MapVote extends DiscordBasePlugin { } this.broadcastNominations(); return; + case "endmatch": + if (!isAdmin) return; + this.server.rcon.execute(`AdminEndMatch`) + return; case "help": //displays available commands let msg = ""; msg += (`!vote\n > choices\n > results\n`); @@ -684,7 +688,7 @@ export default class MapVote extends DiscordBasePlugin { async endVotingGently(steamID = null) { if (!this.votingEnabled) return; - + this.endVoting(); if (steamID) await this.warn(steamID, "Voting terminated!");