1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Rename "build" privilege to "interact" (backwards-compatibly, of course)

This commit is contained in:
Perttu Ahola 2011-12-02 12:18:19 +02:00
parent 69bc9224db
commit 932988af46
3 changed files with 13 additions and 11 deletions

View file

@ -28,8 +28,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
std::set<std::string> privsToSet(u64 privs)
{
std::set<std::string> s;
if(privs & PRIV_BUILD)
s.insert("build");
if(privs & PRIV_INTERACT)
s.insert("interact");
if(privs & PRIV_TELEPORT)
s.insert("teleport");
if(privs & PRIV_SETTIME)
@ -52,8 +52,8 @@ std::set<std::string> privsToSet(u64 privs)
std::string privsToString(u64 privs)
{
std::ostringstream os(std::ios_base::binary);
if(privs & PRIV_BUILD)
os<<"build,";
if(privs & PRIV_INTERACT)
os<<"interact,";
if(privs & PRIV_TELEPORT)
os<<"teleport,";
if(privs & PRIV_SETTIME)
@ -89,7 +89,9 @@ u64 stringToPrivs(std::string str)
{
std::string s = trim(f.next(","));
if(s == "build")
privs |= PRIV_BUILD;
privs |= PRIV_INTERACT;
else if(s == "interact")
privs |= PRIV_INTERACT;
else if(s == "teleport")
privs |= PRIV_TELEPORT;
else if(s == "settime")