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 share.mod feature negotiation between bots #1629

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Jun 22, 2024

Found by: michaelortmann
Patch by: michaelortmann
Fixes:

One-line summary:
Fix share.mod user file feature parser/checker

Additional description (if needed):
Since eggdrop 1.8.1 the share.mod feature negotiation between bots is broken.
Here we removed what looked like a surplus white space :
afdd3a5#diff-b39a75736674964b2c9de0f99a01ea3084f0a7d6288184e7dc98fe7ee075135e
But the bots parser/checker depends on that very trailing space and drops the last feature, if the space is not seen
So, this bug disables the last share.mod feature negotiated.
For .console +gh the lines
[03:21:30] {b<-BotB} uy exempts invites compress
and
[03:21:30] {b->BotB} feats exempts invites compress
are associated.
For a buggy bot, the last line would be without the last word:
[04:13:06] {b->BotB} feats exempts invites
If the last feature, like in this example is compress, then this bug disables compression for user file sharing, rendering the following config a noop:

loadmodule compress
set share-compressed 1

This PR fixes the parser.

Additionally, to be compatible to buggy bots (bots that have the buggy feature parser but at the same time send all feature flags), the trailing white space is re-added.

After adding the trailing whitespace, it didnt work with my eggdrop 1.9.5 testbot. Turns out, also the bug fixed with #1506 broke userfile sharing. So, fixing / testing is only possible for bots not effected by the bug fixed with #1506. eggdrop versions >= 1090200 and <= 1090504.

Test cases demonstrating functionality (if applicable):
Link 2 share bots with

loadmodule compress
set share-compressed 1

Test 1:
Active and passive share bots are the version equal to this PR
Result:

[23:11:30] Uncompressing user file from BotA.
[23:11:30] Userfile loaded, unpacking...
[23:11:30] Userlist transfer complete; switched over.

Test2:
Active share bot is the version equal to this PR, passive share bot is version after merge of #1506 which equals 6bc6560
Result:

[23:14:13] Uncompressing user file from BotA.
[23:14:13] Userfile loaded, unpacking...
[23:14:13] Userlist transfer complete; switched over.

@michaelortmann michaelortmann changed the title (WIP) Fix share.mod` feature negotiation between bots (WIP) Fix share.mod feature negotiation between bots Jun 22, 2024
@michaelortmann michaelortmann changed the title (WIP) Fix share.mod feature negotiation between bots Fix share.mod feature negotiation between bots Jun 22, 2024
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