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

Fix: remove spaces from reply to MXP version tag. #7144

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

eowmob
Copy link
Contributor

@eowmob eowmob commented Feb 12, 2024

Brief overview of PR changes/additions

Removes spaces from the version string returned by MXP to avoid parsing issues in the mud. Also, like other MXP clients, mudlet will now report the version nummer without prefixing the client name (which is reported in a separate field).

Motivation for adding to Mudlet

Improve MXP compatibility

Other info (issues closed, discussion etc)

This is meant as a fix to issue #7140 which popped up in recent PTB versions when the format of the internal version string was changed.

@eowmob eowmob requested review from a team as code owners February 12, 2024 17:40
@add-deployment-links
Copy link

add-deployment-links bot commented Feb 12, 2024

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@vadi2
Copy link
Member

vadi2 commented Feb 12, 2024

Thanks for throwing a PR together. Could you also test #7138 ?

@eowmob
Copy link
Contributor Author

eowmob commented Feb 12, 2024

Could you also test #7138 ?

Sure, I had already resynched my PR to the change of the development tree, so the test versions above contain the fix to both #7138 and my fix to #7140 (they really do, though the bot msg is shown before my merge entry, but check the build hash) . My PR and #7138 address somewhat different issues: I did not notice the GMCP issue (sorry), I noticed MXP parsing (in the mud) has issues when the version number was now prefixed with "mudlet " rather than "mudlet-".

As I already resynched or rebased my PR to the current development, I can say both fixes are compatible and deal with separate issues (note I did a bunch of recompiles, test version downloads etc. to check my fix and #7138 fix the resp. MXP / GMCP issue alone, nothing more). I was wondering though, why the trailing \n in the version string did not manifest in MXP.

After some gdb debugging I'm confident this boils down to ctelnet.cpp:607 bool cTelnet::sendData() which probably removes the additional \n with data.remove(QChar::LineFeed); in line 609 . So the \n at the end of the version string in the reply to <VERSION> never makes it to the mud.

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.

None yet

2 participants