Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Send chat messages to old clients serverpackethandler.cpp.diff
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -740,6 +740,14 @@ void Server::handleCommand_ClientReady(NetworkPacket* pkt)
peer_id, major_ver, minor_ver, patch_ver,
full_ver);
+ if (major_ver == 0) {
+ if (minor_ver < 4 || patch_ver < 13)
+ SendChatMessage(pkt->getPeerId(), L"You're using an old Minetest version. Some features may not be available.");
+ } else
+ SendChatMessage(pkt->getPeerId(), L"You're using a weird Minetest version. We recommend Minetest 0.4.13 for the best results.");
+
m_clients.event(peer_id, CSE_SetClientReady);
m_script->on_joinplayer(playersao);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.