diff options
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/server.h b/src/server.h index a6da801be..7b73e476c 100644 --- a/src/server.h +++ b/src/server.h @@ -424,7 +424,29 @@ public: // Envlock and conlock should be locked when calling this void SendMovePlayer(Player *player); + + u64 getPlayerAuthPrivs(const std::string &name) + { + try{ + return m_authmanager.getPrivs(name); + } + catch(AuthNotFoundException &e) + { + dstream<<"WARNING: Auth not found for "<<name<<std::endl; + return 0; + } + } + void setPlayerAuthPrivs(const std::string &name, u64 privs) + { + try{ + return m_authmanager.setPrivs(name, privs); + } + catch(AuthNotFoundException &e) + { + dstream<<"WARNING: Auth not found for "<<name<<std::endl; + } + } private: @@ -493,6 +515,8 @@ private: void handlePeerChange(PeerChange &c); void handlePeerChanges(); + u64 getPlayerPrivs(Player *player); + /* Variables */ |