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

GMSG strings displaying incorrectly in Discord #118

Open
LakeYS opened this issue Sep 9, 2021 · 5 comments
Open

GMSG strings displaying incorrectly in Discord #118

LakeYS opened this issue Sep 9, 2021 · 5 comments
Assignees
Labels

Comments

@LakeYS
Copy link
Owner

LakeYS commented Sep 9, 2021

image

Observed on a completely vanilla server.

@LakeYS LakeYS added the bug label Sep 9, 2021
@LakeYS LakeYS self-assigned this Sep 9, 2021
@LakeYS
Copy link
Owner Author

LakeYS commented Dec 29, 2021

Requires testing in new update

@LakeYS
Copy link
Owner Author

LakeYS commented Dec 30, 2021

More reports of this in 2.0.0-rc1, as seen here: #119 (comment)

Player 'BigCone' left the2021-12-30T22:56:23 1796.155 INF Botman PlayerDisconnected2021-12-30T22:56:23 1796.155 INF Botman PlayerDisconnected
Player 'BigCone' left the game

And another quick-fix for the weird "left" messages, we can validate any message reading as "GMSG" to ensure it contains a whitelisted set of strings, being "died", "left the game", or "joined the game".

This would similarly be a temporary solution, and you would see a warning in console indicating that something is still wrong.

@LakeYS
Copy link
Owner Author

LakeYS commented Dec 31, 2021

I've done some testing and found a potential cause, here's a breakdown:

In computer operating systems, there are a few different types of data that can indicate the ending of a line in text. These being CRLF, LF, and CR. Generally, you see LF (\r) in Linux and Mac, and CRLF (\r\n) in Windows. (This is somewhat simplified)

If you enable debug-mode in the new rc3 build, you'll see a new log that tells you which one the game is using. The result: It's actually mixing them, sometimes using LF and sometimes using CRLF. This is confusing both the telnet client and the bot's own system, which are configured to look for CRLF. In turn, this is causing the bot to not properly recognize where lines from the console are ending. I suspect that this is at least partially the cause. If mods are also using a different line ending, it would perfectly explain the mod conflicts as well.

I made a quick-fix change in rc3 that should at least partially remedy this, but we'll have to see how it performs in testing.

@LakeYS
Copy link
Owner Author

LakeYS commented Jan 3, 2022

As of today, we've discovered that some lines are also being ended with CR. Detection and fixes are being adjusted accordingly: 02c6d84

image

@LakeYS
Copy link
Owner Author

LakeYS commented Jan 19, 2022

Got another report of this via Discord following the aforementioned patch. Will move on to regex message screening/detection in an attempt to resolve this.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant