mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
strict_protocol_version_checking setting; PROTOCOL_VERSION in clientserver.h; clean up defaultsettings.cpp and minetest.conf.example
This commit is contained in:
parent
74febd5c31
commit
94dfececf6
5 changed files with 32 additions and 16 deletions
|
@ -1927,11 +1927,14 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
}
|
||||
|
||||
/* Uhh... this should actually be a warning but let's do it like this */
|
||||
if(net_proto_version < 2)
|
||||
if(g_settings->getBool("strict_protocol_version_checking"))
|
||||
{
|
||||
SendAccessDenied(m_con, peer_id,
|
||||
L"Your client is too old. Please upgrade.");
|
||||
return;
|
||||
if(net_proto_version < PROTOCOL_VERSION)
|
||||
{
|
||||
SendAccessDenied(m_con, peer_id,
|
||||
L"Your client is too old. Please upgrade.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2110,9 +2113,9 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
}
|
||||
|
||||
// Warnings about protocol version can be issued here
|
||||
if(getClient(peer->id)->net_proto_version < 3)
|
||||
if(getClient(peer->id)->net_proto_version < PROTOCOL_VERSION)
|
||||
{
|
||||
SendChatMessage(peer_id, L"# Server: WARNING: YOUR CLIENT IS OLD AND DOES NOT WORK PROPERLY WITH THIS SERVER");
|
||||
SendChatMessage(peer_id, L"# Server: WARNING: YOUR CLIENT IS OLD AND MAY WORK PROPERLY WITH THIS SERVER");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue