diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-09-22 20:47:47 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-09-22 20:47:47 +0300 |
commit | bdf54908aa0b8dabbc67f1925de88bc88a70c935 (patch) | |
tree | abd9224c6d56fc25ed95c32cd6eff1fd9a1a69c2 /src | |
parent | 7244f091115c467cd5c0020bb2fb74f70c4114e5 (diff) | |
download | minetest-bdf54908aa0b8dabbc67f1925de88bc88a70c935.tar.gz minetest-bdf54908aa0b8dabbc67f1925de88bc88a70c935.tar.bz2 minetest-bdf54908aa0b8dabbc67f1925de88bc88a70c935.zip |
Make client report a newer version number to the server than 2011-07-31 does and make the server enforce it
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 2 | ||||
-rw-r--r-- | src/server.cpp | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index a5ed6f61b..fcc5a0a1e 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -431,7 +431,7 @@ void Client::step(float dtime) snprintf((char*)&data[23], PASSWORD_SIZE, "%s", m_password.c_str()); // This should be incremented in each version - writeU16(&data[51], 1); + writeU16(&data[51], 2); // Send as unreliable Send(0, data, false); diff --git a/src/server.cpp b/src/server.cpp index 14d8942cb..a04417074 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2010,6 +2010,14 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) L"Your client is too old. Please upgrade."); return; } + + /* Uhh... this should actually be a warning but let's do it like this */ + if(net_proto_version < 2) + { + SendAccessDenied(m_con, peer_id, + L"Your client is too old. Please upgrade."); + return; + } /* Set up player |