Allow "all" to be specified in player config file for privileges

master
Ciaran Gultnieks 2011-05-16 11:32:49 +01:00
parent 248d7c8469
commit 50c48219a7
1 changed files with 10 additions and 1 deletions

View File

@ -144,7 +144,16 @@ void Player::deSerialize(std::istream &is)
hp = 20;
}
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){
privs = PRIV_DEFAULT;
}