Skip to content

Client resource hash database and client resource protection#430

Merged
WiserTixx merged 6 commits intominorfrom
mod-db
May 10, 2025
Merged

Client resource hash database and client resource protection#430
WiserTixx merged 6 commits intominorfrom
mod-db

Conversation

@WiserTixx
Copy link
Collaborator

@WiserTixx WiserTixx commented Apr 26, 2025

Mod database

This PR adds a local database of mods, which is used to cache mod hashes and protection status.

Mod hash caching

Mod hashes will now be cached based on last write date. This will speed up server startup because only the mods with changes will have to be hashed.

Mod protection

You can now protect mods! This will allow you to host a server with copyrighted content without actually hosting the copyrighted content. Just run protectmod <filename with .zip> <true/false> in the console to protect a mod. Users that join a server with protected mods will have to obtain the file themselves and put it in their launcher's resources folder. The launcher will inform the user about this if the file is missing.

Mod reloading

You can now reload client mods while the server is running by using reloadmods in the console. Keep in mind that this is mainly intended for development, therefore it will not force client to rejoin and neither will is hot-reload mods on the client.


By creating this pull request, I understand that code that is AI generated or otherwise automatically generated may be rejected without further discussion.
I declare that I fully understand all code I pushed into this PR, and wrote all this code myself and own the rights to this code.

WiserTixx added a commit to BeamMP/BeamMP-Launcher that referenced this pull request May 5, 2025
Launcher implementation for
BeamMP/BeamMP-Server#430. This PR checks if mods
are protected, and if a mod is missing the launcher will notify the user
about it and give them instructions on how to resolve it.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
@WiserTixx WiserTixx requested a review from SaltySnail May 5, 2025 21:56
Copy link
Collaborator

@SaltySnail SaltySnail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, just some suggestions on stuff the user is going to see

Co-authored-by: SaltySnail <51403141+SaltySnail@users.noreply.github.com>
Copy link
Collaborator

@SaltySnail SaltySnail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@WiserTixx WiserTixx merged commit b7cf304 into minor May 10, 2025
9 checks passed
@WiserTixx WiserTixx deleted the mod-db branch May 10, 2025 23:32
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