From: Ciaran Gultnieks Date: Mon, 16 May 2011 10:32:49 +0000 (+0100) Subject: Allow "all" to be specified in player config file for privileges X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=50c48219a7ee6fe11566779f03e5e80361155b3f;p=zefram%2Fminetest%2Fminetest_engine.git Allow "all" to be specified in player config file for privileges --- diff --git a/src/player.cpp b/src/player.cpp index a6ddeee6..2ebf158a 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -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; }