Merge branch 'master' into updated_5.9.0

This commit is contained in:
Luke aka SwissalpS 2024-12-26 03:35:34 +01:00 committed by GitHub
commit 0a8276f105
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -178,14 +178,17 @@ function factions.disband_faction(faction_name)
return true
end
function factions.hash_password(password)
return minetest.sha256(password)
end
function factions.valid_password(faction_name, password)
if not facts[faction_name] or not password then
return false
end
return factions.hash_password(password) == facts[faction_name].password256
end
@ -199,6 +202,7 @@ function factions.set_password(faction_name, password)
if not (facts[faction_name] and 'string' == type(password)) then
return false
end
facts[faction_name].password256 = factions.hash_password(password)
save_factions()
return true
@ -287,6 +291,7 @@ function cc.list()
end
end
function cc.info(player_name, params)
local faction_name = params[2]
if not faction_name then

View File

@ -34,7 +34,7 @@ Missing faction name.=Nom de faction manquant.
Missing password.=Mot de passe manquant.
Missing player name.=Nom de joueur manquant.
Name: @1@nOwner: @2@nMembers: @3=Nom : @1@nPropriétaire : @2@nMembres : @3
Ownership has been transferred to @1.=La propriété a été transférée à @2.
Ownership has been transferred to @1.=La propriété a été transférée à @1.
Password has been updated.=Le mot de passe a été mis à jour.
Permission denied: Wrong password.=Permission refusée : mauvais mot de passe.