forked from Mirrorlandia_minetest/minetest
Allow "all" to be specified in player config file for privileges
This commit is contained in:
parent
248d7c8469
commit
50c48219a7
@ -144,7 +144,16 @@ void Player::deSerialize(std::istream &is)
|
|||||||
hp = 20;
|
hp = 20;
|
||||||
}
|
}
|
||||||
try{
|
try{
|
||||||
privs = args.getU64("privs");
|
std::string sprivs = args.get("privs");
|
||||||
|
if(sprivs == "all")
|
||||||
|
{
|
||||||
|
privs = PRIV_ALL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::istringstream ss(sprivs);
|
||||||
|
ss>>privs;
|
||||||
|
}
|
||||||
}catch(SettingNotFoundException &e){
|
}catch(SettingNotFoundException &e){
|
||||||
privs = PRIV_DEFAULT;
|
privs = PRIV_DEFAULT;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user