Skip to content

Commit

Permalink
Fixed left the game message, removed unused script
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaspalmero committed Sep 24, 2021
1 parent 19fbf1f commit 4921bac
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ tail.on("line", (data) => {
// player left?
else if (regexes.playerLeft.test(data)) {
changeUserAmount(-1);
let name = escapeDiscordMarkup(data.match((regexes.matchNameFromLeft)));
let name = escapeDiscordMarkup(data.match((regexes.matchNameFromLeft)).substring(1));
client.channels.cache.get(config.discord.channelId).send(
msgs.leftGame.replace('$1', name).replace('$2', playerAmount)
);
Expand Down
2 changes: 1 addition & 1 deletion modules/regexes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module.exports = {
firstNameChange: /^\*Player [0-9]{1,2} renamed to .{1,22}$/,
nameChange: /^\*.{1,22} renamed to .{1,22}$/,
playerLeft: /^\*.{1,22} left the game.*/,
matchNameFromNameChange: /(?<=Player [0-9]{1,2} renamed to ).{1,22}$/,
serverStarted: /^Entering main game loop\.\.\.$/,
serverMessage: /^<~SERVER>.*/,
matchNameFromNameChange: /(?<=Player [0-9]{1,2} renamed to ).{1,22}$/,
matchNameFromLeft: /^.{1,22}(?= left the game)/
};
30 changes: 0 additions & 30 deletions sh/killtmuxsession.sh

This file was deleted.

0 comments on commit 4921bac

Please sign in to comment.