mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
player passwords and privileges in world/auth.txt
--HG-- extra : rebase_source : 7260636295d9068fbeeddf4143c89f2b8a91446c
This commit is contained in:
parent
99c2ac0125
commit
63611932eb
22 changed files with 590 additions and 175 deletions
|
@ -35,7 +35,7 @@ void cmd_privs(std::wostringstream &os,
|
|||
{
|
||||
// Show our own real privs, without any adjustments
|
||||
// made for admin status
|
||||
os<<L"-!- " + privsToString(ctx->player->privs);
|
||||
os<<L"-!- " + narrow_to_wide(privsToString(ctx->player->privs));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ void cmd_privs(std::wostringstream &os,
|
|||
return;
|
||||
}
|
||||
|
||||
os<<L"-!- " + privsToString(tp->privs);
|
||||
os<<L"-!- " + narrow_to_wide(privsToString(tp->privs));
|
||||
}
|
||||
|
||||
void cmd_grantrevoke(std::wostringstream &os,
|
||||
|
@ -70,7 +70,7 @@ void cmd_grantrevoke(std::wostringstream &os,
|
|||
return;
|
||||
}
|
||||
|
||||
u64 newprivs = stringToPrivs(ctx->parms[2]);
|
||||
u64 newprivs = stringToPrivs(wide_to_narrow(ctx->parms[2]));
|
||||
if(newprivs == PRIV_INVALID)
|
||||
{
|
||||
os<<L"-!- Invalid privileges specified";
|
||||
|
@ -90,7 +90,7 @@ void cmd_grantrevoke(std::wostringstream &os,
|
|||
tp->privs &= ~newprivs;
|
||||
|
||||
os<<L"-!- Privileges change to ";
|
||||
os<<privsToString(tp->privs);
|
||||
os<<narrow_to_wide(privsToString(tp->privs));
|
||||
}
|
||||
|
||||
void cmd_time(std::wostringstream &os,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue