chore: added endmatch command

This commit is contained in:
Davide Fantino 2023-03-01 13:18:42 +01:00
parent 73c3166912
commit ab3c03563e
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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!");