diff options
author | Kahrl <kahrl@gmx.net> | 2011-11-20 20:16:15 +0100 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-12-01 12:06:39 +0200 |
commit | 2ca00fa585087f2097796d994d378708041a7194 (patch) | |
tree | b2aecfa7d40b17f3b5eeac3b27942767c2b2aeec /src/server.h | |
parent | 1901158b3eacc95d945becea62ac28039618f460 (diff) | |
download | minetest-2ca00fa585087f2097796d994d378708041a7194.tar.gz minetest-2ca00fa585087f2097796d994d378708041a7194.tar.bz2 minetest-2ca00fa585087f2097796d994d378708041a7194.zip |
Fix processing of the default_password setting. It is now actually used as the plaintext password for new users. Also add /setpassword and /clearpassword server commands that can be used by admins with the PRIV_PASSWORD privilege, and update the /help message.
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server.h b/src/server.h index 98c4f65d6..618b05d99 100644 --- a/src/server.h +++ b/src/server.h @@ -456,6 +456,10 @@ public: dstream<<"WARNING: Auth not found for "<<name<<std::endl; } } + + // Changes a player's password, password must be given as plaintext + // If the player doesn't exist, a new entry is added to the auth manager + void setPlayerPassword(const std::string &name, const std::wstring &password); // Saves g_settings to configpath given at initialization void saveConfig(); @@ -591,12 +595,11 @@ private: /* Get a player from memory or creates one. If player is already connected, return NULL - The password is not checked here - it is only used to - set the password if a new player is created. + Does not verify/modify auth info and password. Call with env and con locked. */ - Player *emergePlayer(const char *name, const char *password, u16 peer_id); + Player *emergePlayer(const char *name, u16 peer_id); // Locks environment and connection by its own struct PeerChange; |