From bd14ffd8cc9b42013b6764aec3fa35419ed22797 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Sun, 8 Feb 2026 08:52:27 +0100 Subject: [PATCH] Send IAM message --- src/engine/client/client.cpp | 6 ++++++ src/engine/shared/protocol_ex_msgs.h | 1 + src/game/version.h | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index cbca9e51608..716c94305bb 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -228,6 +229,11 @@ void CClient::SendInfo(int Conn) return; } + CMsgPacker IamDuck(NETMSG_IAMDUCKCLIENT, true); + IamDuck.AddInt(DUCKCLIENT_VERSIONNUM); + IamDuck.AddString("duck " DUCKCLIENT_VERSIONSTR " built on " __DATE__ ", " __TIME__); + SendMsg(Conn, &IamDuck, MSGFLAG_VITAL); + CMsgPacker MsgVerInfclass(NETMSG_CLIENTVER_INFCLASS, true); MsgVerInfclass.AddInt(INFCLASS_CLIENT_VERSION); SendMsg(Conn, &MsgVerInfclass, MSGFLAG_VITAL); diff --git a/src/engine/shared/protocol_ex_msgs.h b/src/engine/shared/protocol_ex_msgs.h index 40b6ee42560..1ea161dbfea 100644 --- a/src/engine/shared/protocol_ex_msgs.h +++ b/src/engine/shared/protocol_ex_msgs.h @@ -33,6 +33,7 @@ UUID(NETMSG_MAP_DETAILS, "map-details@ddnet.tw") UUID(NETMSG_CAPABILITIES, "capabilities@ddnet.tw") UUID(NETMSG_CLIENTVER, "clientver@ddnet.tw") UUID(NETMSG_CLIENTVER_INFCLASS, "clientver@infclass") +UUID(NETMSG_IAMDUCKCLIENT, "i-am-duckclient@pointer31.github.io") UUID(NETMSG_PINGEX, "ping@ddnet.tw") UUID(NETMSG_PONGEX, "pong@ddnet.tw") UUID(NETMSG_CHECKSUM_REQUEST, "checksum-request@ddnet.tw") diff --git a/src/game/version.h b/src/game/version.h index 2622fe6c1ac..d431e51fb2b 100644 --- a/src/game/version.h +++ b/src/game/version.h @@ -18,4 +18,9 @@ extern const char *GIT_SHORTREV_HASH; #define GAME_NETVERSION "0.6 626fce9a778df4d4" #define GAME_NETVERSION7 "0.7 802f1be60a05665f" +// duck client + +#define DUCKCLIENT_VERSIONNUM 4010 +#define DUCKCLIENT_VERSIONSTR "v4.1" + #endif