aboutsummaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-05-29 21:11:16 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-05-29 21:11:16 +0300
commit63611932ebae93620386b26cfa82f7c4552b22ff (patch)
tree57c065bebf3ba53857dbed80e48cf67cd7e63038 /src/client.cpp
parent99c2ac0125f9bbae0a4b06e6e7145f76f4dfbbf4 (diff)
downloadminetest-63611932ebae93620386b26cfa82f7c4552b22ff.tar.gz
minetest-63611932ebae93620386b26cfa82f7c4552b22ff.tar.bz2
minetest-63611932ebae93620386b26cfa82f7c4552b22ff.zip
player passwords and privileges in world/auth.txt
--HG-- extra : rebase_source : 7260636295d9068fbeeddf4143c89f2b8a91446c
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 5869dc77b..79bbd8021 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -610,6 +610,13 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
// to be processed even if the serialisation format has
// not been agreed yet, the same as TOCLIENT_INIT.
m_access_denied = true;
+ m_access_denied_reason = L"Unknown";
+ if(datasize >= 4)
+ {
+ std::string datastring((char*)&data[2], datasize-2);
+ std::istringstream is(datastring, std::ios_base::binary);
+ m_access_denied_reason = deSerializeWideString(is);
+ }
return;
}