Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup & modernization #150

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Code cleanup & modernization #150

wants to merge 11 commits into from

Conversation

LakeYS
Copy link
Owner

@LakeYS LakeYS commented Jan 18, 2025

This is a behind-the-scenes modernization and patch-up for 2025.

  • Update to discord.js 14.
  • Update telnet-client and ws to modern versions.
  • Replace variable declarations to use 'let' and 'const'.
  • Rewrite the main regex matcher for clarity.
  • Replace the outdated ESLint config, add the used ESLint version as a dev dependency,

Lake and others added 11 commits September 29, 2024 18:07
- Update regex and logic to support version 1.0 of the game.
- Use a single regex string to capture both chat and GMSG strings instead of separately handling both.
- To handle the lack of player names in message IDs, maintain an index of entity IDs to player names. Update this on startup with the 'lpi' command and whenever new players join through the 'PlayerSpawnedInWorld' message.
Bring variable definitions up to modern times. Removes ambiguity over
which variables are reassigned.
* Update telnet-client to 2.2.1. Fixes issues with message spam due to
  the client sending repeated data.
* Update ws to clear vulnerability
Fix the 'unknown player' warning erroneously being logged every time a
GMSG is sent.
Fix command errors due to const in a for loop.
Revert the workaround for player names as the new updates no-longer need
this.
@LakeYS LakeYS self-assigned this Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant