Refactor version rejection logic in ApiContext

- Renamed the `rejectWrongProtocolVersion` function to `rejectWrongVersion` for clarity.
- Enhanced version mismatch handling by providing detailed error messages when the plugin and server versions do not match.
- Updated the expected server version format in the configuration to include the patch version, ensuring accurate version checks.

These changes improve error reporting and version management in the plugin's API context.
This commit is contained in:
Joe 2026-02-17 20:48:39 -06:00
parent 6c0098d839
commit dcd9253770
2 changed files with 22 additions and 14 deletions

View file

@ -26,7 +26,7 @@ return strict("Config", {
isDevBuild = isDevBuild,
codename = "Epiphany",
version = realVersion,
expectedServerVersionString = ("%d.%d or newer"):format(realVersion[1], realVersion[2]),
expectedServerVersionString = ("%d.%d.%d"):format(realVersion[1], realVersion[2], realVersion[3]),
protocolVersion = 6,
defaultHost = "localhost",
defaultPort = "34873",