Skip to content

Update rcon.js#406

Closed
20R-Grumpus wants to merge 1 commit intoTeam-Silver-Sphere:masterfrom
20R-Grumpus:master
Closed

Update rcon.js#406
20R-Grumpus wants to merge 1 commit intoTeam-Silver-Sphere:masterfrom
20R-Grumpus:master

Conversation

@20R-Grumpus
Copy link
Copy Markdown

updates to getCurrentMap() and getNextMap() and helps fix layer names returned as unknown

Null-safe fallback
Improved regex | Handles unexpected trailing commas or extra info after the layer name.
Layer name cleanup | Treats "unknown" or empty strings as invalid layer values.
Returns layerid and name

includes logging for layer response info that may be removed

updates to make getCurrentMap() and getNextMap() more robust
@20R-Grumpus
Copy link
Copy Markdown
Author

Layer name returned as Unknown still occurs but can be handled within plugins to keep asking

@werewolfboy13
Copy link
Copy Markdown
Collaborator

Rejecting in favor of #405. We need QA testing to have a valid path.

@20R-Grumpus
Copy link
Copy Markdown
Author

hopefully #405 solves similar issues, i am not fully up to speed on those changes. Was just asked to submit by dave. The purpose of this is to improve functionality for discord-server-status.js regularly failing to show the layer whilst at the same time preventing other custom plugins from working in the event that the map is returned as unknown.

However this change has been deployed on our live server since a few days prior to this PR and has not resulted in any breakage beyond when discord-server-status.js receives a layer name that includes underscores. In which case it wont load the map picture, but the discord bots status and its embed never show unknown.

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.

2 participants