mirror of
https://github.com/mt-mods/playerfactions.git
synced 2025-01-03 11:17:32 +01:00
Properly use the configurable admin priv in output
This commit is contained in:
parent
d09b01a397
commit
8f249e27cc
14
init.lua
14
init.lua
@ -249,7 +249,7 @@ local function handle_command(name, param)
|
|||||||
return false, S("This faction doesn't exists.")
|
return false, S("This faction doesn't exists.")
|
||||||
elseif name ~= factions.get_owner(faction_name) and not minetest.get_player_privs(name)[factions.priv] then
|
elseif name ~= factions.get_owner(faction_name) and not minetest.get_player_privs(name)[factions.priv] then
|
||||||
return false, S("Permission denied: You are not the owner of this faction, " ..
|
return false, S("Permission denied: You are not the owner of this faction, " ..
|
||||||
"and don't have the playerfactions_admin privilege.")
|
"and don't have the @1 privilege.", factions.priv)
|
||||||
elseif not factions.valid_password(faction_name, password) then
|
elseif not factions.valid_password(faction_name, password) then
|
||||||
return false, S("Permission denied: Wrong password.")
|
return false, S("Permission denied: Wrong password.")
|
||||||
else
|
else
|
||||||
@ -336,8 +336,8 @@ local function handle_command(name, param)
|
|||||||
end
|
end
|
||||||
if minetest.get_player_privs(player_name)[factions.priv] then
|
if minetest.get_player_privs(player_name)[factions.priv] then
|
||||||
summary = summary .. "\n" .. S(
|
summary = summary .. "\n" .. S(
|
||||||
"@1 has the playerfactions_admin privilege so they can admin every faction.",
|
"@1 has the @2 privilege so they can admin every faction.",
|
||||||
player_name
|
player_name, factions.priv
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
return true, summary
|
return true, summary
|
||||||
@ -412,7 +412,7 @@ local function handle_command(name, param)
|
|||||||
return false, S("Missing player name.")
|
return false, S("Missing player name.")
|
||||||
elseif factions.get_owner(faction_name) ~= name and not minetest.get_player_privs(name)[factions.priv] then
|
elseif factions.get_owner(faction_name) ~= name and not minetest.get_player_privs(name)[factions.priv] then
|
||||||
return false, S("Permission denied: You are not the owner of this faction, " ..
|
return false, S("Permission denied: You are not the owner of this faction, " ..
|
||||||
"and don't have the playerfactions_admin privilege.")
|
"and don't have the @1 privilege.", factions.priv)
|
||||||
elseif not facts[faction_name].members[target] then
|
elseif not facts[faction_name].members[target] then
|
||||||
return false, S("This player is not in the specified faction.")
|
return false, S("This player is not in the specified faction.")
|
||||||
elseif target == factions.get_owner(faction_name) then
|
elseif target == factions.get_owner(faction_name) then
|
||||||
@ -450,7 +450,7 @@ local function handle_command(name, param)
|
|||||||
return false, S("Missing password.")
|
return false, S("Missing password.")
|
||||||
elseif factions.get_owner(faction_name) ~= name and not minetest.get_player_privs(name)[factions.priv] then
|
elseif factions.get_owner(faction_name) ~= name and not minetest.get_player_privs(name)[factions.priv] then
|
||||||
return false, S("Permission denied: You are not the owner of this faction, " ..
|
return false, S("Permission denied: You are not the owner of this faction, " ..
|
||||||
"and don't have the playerfactions_admin privilege.")
|
"and don't have the @1 privilege.", factions.priv)
|
||||||
else
|
else
|
||||||
if factions.set_password(faction_name, password) then
|
if factions.set_password(faction_name, password) then
|
||||||
return true, S("Password has been updated.")
|
return true, S("Password has been updated.")
|
||||||
@ -492,7 +492,7 @@ local function handle_command(name, param)
|
|||||||
return false, S("Missing password.")
|
return false, S("Missing password.")
|
||||||
elseif name ~= factions.get_owner(faction_name) and not minetest.get_player_privs(name)[factions.priv] then
|
elseif name ~= factions.get_owner(faction_name) and not minetest.get_player_privs(name)[factions.priv] then
|
||||||
return false, S("Permission denied: You are not the owner of this faction, " ..
|
return false, S("Permission denied: You are not the owner of this faction, " ..
|
||||||
"and don't have the playerfactions_admin privilege.")
|
"and don't have the @1 privilege.", factions.priv)
|
||||||
elseif not facts[faction_name].members[target] then
|
elseif not facts[faction_name].members[target] then
|
||||||
return false, S("@1 isn't in your faction.", target)
|
return false, S("@1 isn't in your faction.", target)
|
||||||
elseif not factions.valid_password(faction_name, password) then
|
elseif not factions.valid_password(faction_name, password) then
|
||||||
@ -506,7 +506,7 @@ local function handle_command(name, param)
|
|||||||
end
|
end
|
||||||
elseif action == "invite" then
|
elseif action == "invite" then
|
||||||
if not minetest.get_player_privs(name)[factions.priv] then
|
if not minetest.get_player_privs(name)[factions.priv] then
|
||||||
return false, S("Permission denied: You can't use this command, playerfactions_admin priv is needed.")
|
return false, S("Permission denied: You can't use this command, @1 priv is needed.", factions.priv)
|
||||||
else
|
else
|
||||||
local target = params[2]
|
local target = params[2]
|
||||||
local faction_name = params[3]
|
local faction_name = params[3]
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
### init.lua ###
|
### init.lua ###
|
||||||
|
|
||||||
@1 has the playerfactions_admin privilege so they can admin every faction.=@1 a le privilège playerfactions_admin et peut donc administrer toutes les factions.
|
@1 has the @2 privilege so they can admin every faction.=@1 a le privilège @2 et peut donc administrer toutes les factions.
|
||||||
|
|
||||||
@1 is in the following factions: @2.=@1 est dans les factions suivantes : @2.
|
@1 is in the following factions: @2.=@1 est dans les factions suivantes : @2.
|
||||||
@1 is now a member of the faction @2.=@1 est maintenant membre de la faction @2.
|
@1 is now a member of the faction @2.=@1 est maintenant membre de la faction @2.
|
||||||
@1 isn't in your faction.=@1 n’est pas dans votre faction.
|
@1 isn't in your faction.=@1 n’est pas dans votre faction.
|
||||||
Add player to a faction, you need playerfactions_admin privs=Ajoute un joueur à une faction, nécessite le privilège playerfactions_admin
|
Add player to a faction, you need @1 privs=Ajoute un joueur à une faction, nécessite le privilège @1
|
||||||
Allow the use of all playerfactions commands=Autorise l’utilisation de toutes les commandes de playerfactions
|
Allow the use of all playerfactions commands=Autorise l’utilisation de toutes les commandes de playerfactions
|
||||||
|
|
||||||
Change your faction's password or the password of the given faction=Change le mot de passe de votre faction ou la faction donnée
|
Change your faction's password or the password of the given faction=Change le mot de passe de votre faction ou la faction donnée
|
||||||
@ -40,9 +40,9 @@ Password has been updated.=Le mot de passe a été mis à jour.
|
|||||||
Password: @1=Mot de passe : @1
|
Password: @1=Mot de passe : @1
|
||||||
Permission denied: Wrong password.=Permission refusée : mauvais mot de passe.
|
Permission denied: Wrong password.=Permission refusée : mauvais mot de passe.
|
||||||
|
|
||||||
Permission denied: You are not the owner of this faction, and don't have the playerfactions_admin privilege.=Permission refusée : vous n’êtes pas le propriétaire de cette faction, et n’avez pas le privilège playerfactions_admin.
|
Permission denied: You are not the owner of this faction, and don't have the @1 privilege.=Permission refusée : vous n’êtes pas le propriétaire de cette faction, et n’avez pas le privilège @1.
|
||||||
|
|
||||||
Permission denied: You can't use this command, playerfactions_admin priv is needed.=Permission refusée : vous ne pouvez pas utiliser cette commande, le privilège playerfactions_admin est nécessaire.
|
Permission denied: You can't use this command, @1 priv is needed.=Permission refusée : vous ne pouvez pas utiliser cette commande, le privilège @1 est nécessaire.
|
||||||
|
|
||||||
Registered @1.=@1 enregistrée.
|
Registered @1.=@1 enregistrée.
|
||||||
See information on a faction=Voir les informations d’une faction
|
See information on a faction=Voir les informations d’une faction
|
||||||
@ -54,7 +54,7 @@ The faction has more than @1 members, the members list can't be shown.=Cette fac
|
|||||||
|
|
||||||
The given faction doesn't exists.=La faction en question n’existe pas.
|
The given faction doesn't exists.=La faction en question n’existe pas.
|
||||||
The player doesn't exist.=Le joueur n’existe pas.
|
The player doesn't exist.=Le joueur n’existe pas.
|
||||||
The player is already in the faction "@1".=Le joueur est déjà dans la faction "@1".
|
The player is already in the faction "@1".=Le joueur est déjà dans la faction "@1".
|
||||||
There are no factions yet.=Il n’y a pas encore de factions.
|
There are no factions yet.=Il n’y a pas encore de factions.
|
||||||
This faction doesn't exists.=Cette faction n’existe pas.
|
This faction doesn't exists.=Cette faction n’existe pas.
|
||||||
The player name is nil or empty.=Le nom du joueur est nul ou vide.
|
The player name is nil or empty.=Le nom du joueur est nul ou vide.
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
### init.lua ###
|
### init.lua ###
|
||||||
|
|
||||||
@1 has the playerfactions_admin privilege so they can admin every faction.=
|
@1 has the @2 privilege so they can admin every faction.=
|
||||||
|
|
||||||
@1 is in the following factions: @2.=
|
@1 is in the following factions: @2.=
|
||||||
@1 is now a member of the faction @2.=
|
@1 is now a member of the faction @2.=
|
||||||
@1 isn't in your faction.=
|
@1 isn't in your faction.=
|
||||||
Add player to a faction, you need playerfactions_admin privs=
|
Add player to a faction, you need @1 privs=
|
||||||
Allow the use of all playerfactions commands=
|
Allow the use of all playerfactions commands=
|
||||||
|
|
||||||
Change your faction's password or the password of the given faction=
|
Change your faction's password or the password of the given faction=
|
||||||
@ -40,9 +40,9 @@ Password has been updated.=
|
|||||||
Password: @1=
|
Password: @1=
|
||||||
Permission denied: Wrong password.=
|
Permission denied: Wrong password.=
|
||||||
|
|
||||||
Permission denied: You are not the owner of this faction, and don't have the playerfactions_admin privilege.=
|
Permission denied: You are not the owner of this faction, and don't have the @1 privilege.=
|
||||||
|
|
||||||
Permission denied: You can't use this command, playerfactions_admin priv is needed.=
|
Permission denied: You can't use this command, @1 priv is needed.=
|
||||||
|
|
||||||
Registered @1.=
|
Registered @1.=
|
||||||
See information on a faction=
|
See information on a faction=
|
||||||
|
Loading…
Reference in New Issue
Block a user