projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
248d7c8
)
Allow "all" to be specified in player config file for privileges
author
Ciaran Gultnieks
<ciaran@ciarang.com>
Mon, 16 May 2011 10:32:49 +0000
(11:32 +0100)
committer
Ciaran Gultnieks
<ciaran@ciarang.com>
Mon, 16 May 2011 10:32:49 +0000
(11:32 +0100)
src/player.cpp
patch
|
blob
|
history
diff --git
a/src/player.cpp
b/src/player.cpp
index a6ddeee64464dc6b50f07c3ebdbd26a6bfd847cd..2ebf158a648582dc293831253d99ca641c7de179 100644
(file)
--- 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;
}