Skip to content

Updated 5.9.0#12

Merged
SwissalpS merged 73 commits intomasterfrom
updated_5.9.0
Dec 31, 2024
Merged

Updated 5.9.0#12
SwissalpS merged 73 commits intomasterfrom
updated_5.9.0

Conversation

@SwissalpS
Copy link
Contributor

@SwissalpS SwissalpS commented Sep 18, 2024

  • overhauled English language
  • overhauled French language
  • adds Spanish locale
  • adds German locale
  • adds mtt integration testing
  • adds github workflow for mtt
  • refactores handle_command
  • standardizes usage of table.getn() (nothing crucial in this mod)
  • standardizes variables to have same format and same name for same purpouse
  • stores password hashes instead of cleartext
  • DB-fix also adds missing owners to members
  • DB-fix also converts cleartext passwords to hashes
  • fixes some situations where admins couldn't do things
  • fixes display of dynamic admin priv and registration
  • alows uppercase for subcommands
  • adds valid_password() for cleaner checks
  • ensures that existing factions don't get overwritten (by other mods using 'API')
  • adds disband-hook registration for other mods to get notified of disbanded factions

cleartext password storage is bad practice.
returns nil after first run
There is no point in checking other params if this part fails.
password is required
variable save_needed is not used for anything else
also fixed a french mistake: player doesn't own these -> player owns
these
besides, "nil" is a valid name. This way there is no confusion.
stash commit...
- permit admin to disband a faction without having any factions himself
- permit admin to skip password check (he can supply any placeholder)
- permit admin to disband his own single faction
- don't call get_owner or valid_password if is admin
- streamline duplicate code
- check for no factions first -> simpler code
- whitespace: linebreak for easier reading
- whitespace linebreaks for easier reading and consistancy
- update helptext signiture (also for disband) to reflect actual
requirements and standard
- loop members into table for consistant and easier to read code
- move depricated log entry to start of get_player_faction(), no point
in skipping warning.
- simplify get_player_factions()
- whitespace linebreaks for easier reading and consistancy
- loop members into table for consistant and easier to read code
- simplify get_owned_factions()
- make player_name param optional, default to caller (still need to
check as caller name can be missing)
- loop factions into table for consistant and easier to read code (also
presumpted faster)
- don't call get_player_factions() unless needed
- use get_player_factions() instead of depricated get_player_faction()
- truth check of password in valid_password() for easier understanding
of code
- remove explicit nil check where not needed
- update help text to standard syntax
- remove unnecessary param count checks
- simplify leave_faction() argument checking
- simplify and reduce calls of core.get_player_privs()
- update help text to standard syntax
- streamline duplicate code
- remove unnecessary param count checks
- remove explicit nil check where not needed
- don't call get_owner if is admin (until needed)
This was referenced Sep 18, 2024
@SwissalpS SwissalpS marked this pull request as ready for review September 18, 2024 01:56
@BuckarooBanzay
Copy link
Member

what's the difference from this to #11?

@SwissalpS
Copy link
Contributor Author

SwissalpS commented Sep 23, 2024

See #8

#11 has all of the changes in #12 (this PR) minus the password hashing.
Idea is to merge #11 and make at least a tag or a release package for last MT 5.0.0 support. Then merge #12 for 5.9.0+ support.
Or put #12 on a different branch. It's up for discussion/decission.

@wsor4035
Copy link
Contributor

copied from the previous pr

support of the last two major releases of minetest is generally accepted minimum, however not hard set opposed 🤷

@wsor4035
Copy link
Contributor

though 5.10 is around the corner....so would fix that

@SwissalpS
Copy link
Contributor Author

It has been three months without any issues being raised etc.
Luanti 5.10. is out for a hot minute too and I've tagged the last ref compatible with pre-5.9.
and cleartext passwords.

I intend to merge this within a day, maybe two but certainly this year...

Copy link
Member

@BuckarooBanzay BuckarooBanzay left a comment

Choose a reason for hiding this comment

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

didn't test but looks good 👍

@SwissalpS SwissalpS merged commit d6e7c62 into master Dec 31, 2024
4 checks passed
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.

3 participants