From 50c48219a7ee6fe11566779f03e5e80361155b3f Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Mon, 16 May 2011 11:32:49 +0100 Subject: [PATCH] Allow "all" to be specified in player config file for privileges --- src/player.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; } -- 2.30.2