aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_track/models/advtrains_dtrack_vst31.obj
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-12-14 22:26:04 +0100
committerorwell96 <orwell@bleipb.de>2019-12-14 22:26:04 +0100
commitd123679b3c6e44a002ea2fb9e32daa1aa1b0663d (patch)
tree51f53ed4865aa0868c659c4ff691a9f42f4b2d65 /advtrains_train_track/models/advtrains_dtrack_vst31.obj
parenta8ae0a5332934d61739edddeefb6d9184cfce529 (diff)
downloadadvtrains-d123679b3c6e44a002ea2fb9e32daa1aa1b0663d.tar.gz
advtrains-d123679b3c6e44a002ea2fb9e32daa1aa1b0663d.tar.bz2
advtrains-d123679b3c6e44a002ea2fb9e32daa1aa1b0663d.zip
Do not set infotext on Ks signal aspect change
Possible migitation for Linuxworks RAM explosion
Diffstat (limited to 'advtrains_train_track/models/advtrains_dtrack_vst31.obj')
0 files changed, 0 insertions, 0 deletions
ic 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_TELEPORT = 2; // Can teleport const u64 PRIV_SETTIME = 4; // Can set the time const u64 PRIV_PRIVS = 8; // Can grant and revoke privileges const u64 PRIV_SERVER = 16; // Can manage the server (e.g. shutodwn // ,settings) const u64 PRIV_SHOUT = 32; // Can broadcast chat messages to all // players // 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_ALL = 0x7FFFFFFFFFFFFFFFULL; const u64 PRIV_INVALID = 0x8000000000000000ULL; // Convert a privileges value into a human-readable string, // with each component separated by a comma. std::string privsToString(u64 privs); // Converts a comma-seperated list of privilege values into a // privileges value. The reverse of privsToString(). Returns // PRIV_INVALID if there is anything wrong with the input. u64 stringToPrivs(std::string str); struct AuthData { std::string pwd; u64 privs; AuthData(): privs(PRIV_DEFAULT) { } }; class AuthNotFoundException : public BaseException { public: AuthNotFoundException(const char *s): BaseException(s) {} }; class AuthManager { public: AuthManager(const std::string &authfilepath); ~AuthManager(); void load(); void save(); bool exists(const std::string &username); void set(const std::string &username, AuthData ad); void add(const std::string &username); std::string getPassword(const std::string &username); void setPassword(const std::string &username, const std::string &password); u64 getPrivs(const std::string &username); void setPrivs(const std::string &username, u64 privs); bool isModified(); private: JMutex m_mutex; std::string m_authfilepath; core::map<std::string, AuthData> m_authdata; bool m_modified; }; #endif