]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/auth.h
Move ClientMap to clientmap.{h,cpp}
[dragonfireclient.git] / src / auth.h
index 5ea697a6acd1792230ac1e509c31719438e78187..6f176931a67e18ff187ca4ad37270ede95986c78 100644 (file)
@@ -20,17 +20,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef AUTH_HEADER
 #define AUTH_HEADER
 
+#include <set>
 #include <string>
 #include <jthread.h>
 #include <jmutex.h>
-#include "common_irrlicht.h"
+#include "irrlichttypes.h"
 #include "exceptions.h"
 
 // Player privileges. These form a bitmask stored in the privs field
 // of the player, and define things they're allowed to do. See also
 // the static methods Player::privsToString and stringToPrivs that
 // convert these to human-readable form.
-const u64 PRIV_BUILD = 1;            // Can build - i.e. modify the world
+const u64 PRIV_INTERACT = 1;            // Can interact
 const u64 PRIV_TELEPORT = 2;         // Can teleport
 const u64 PRIV_SETTIME = 4;          // Can set the time
 const u64 PRIV_PRIVS = 8;            // Can grant and revoke privileges
@@ -39,14 +40,18 @@ const u64 PRIV_SERVER = 16;          // Can manage the server (e.g. shutodwn
 const u64 PRIV_SHOUT = 32;           // Can broadcast chat messages to all
                                      // players
 const u64 PRIV_BAN = 64;             // Can ban players
+const u64 PRIV_GIVE = 128;             // Can give stuff
+const u64 PRIV_PASSWORD = 256;       // Can set other players' passwords
 
 // Default privileges - these can be overriden for new players using the
 // config option "default_privs" - however, this value still applies for
 // players that existed before the privileges system was added.
-const u64 PRIV_DEFAULT = PRIV_BUILD|PRIV_SHOUT;
+const u64 PRIV_DEFAULT = PRIV_INTERACT|PRIV_SHOUT;
 const u64 PRIV_ALL = 0x7FFFFFFFFFFFFFFFULL;
 const u64 PRIV_INVALID = 0x8000000000000000ULL;
 
+std::set<std::string> privsToSet(u64 privs);
+
 // Convert a privileges value into a human-readable string,
 // with each component separated by a comma.
 std::string privsToString(u64 privs);