From b848e760e4a9a3a80fc20d48fc8632beb7d49433 Mon Sep 17 00:00:00 2001 From: Dunedan Date: Sat, 27 Jun 2026 20:09:27 +0200 Subject: [PATCH] Re-use XMPP resource GUID for whole app runtime Instead of using a new GUID as part of the XMPP resource for each XMPP connection, this keeps the same GUID as long as pyrogenesis is running. This is meant to make it easier to detect players violating the Terms of Use by using multiple accounts to smurf or circumvent bans, as after this change it's not sufficient anymore to connect with another account to stay anonymous, but instead players have to restart pyrogenesis as well. --- source/lobby/XmppClient.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/lobby/XmppClient.cpp b/source/lobby/XmppClient.cpp index 983528f7b8..851a6165eb 100644 --- a/source/lobby/XmppClient.cpp +++ b/source/lobby/XmppClient.cpp @@ -111,7 +111,8 @@ gloox::Client CreateClient(const bool regOpt, const std::string& username, const return gloox::Client{servername}; // Generate a unique, unpredictable resource to allow multiple 0 A.D. instances to connect to the lobby. - gloox::JID clientJid(username + "@" + servername + "/0ad-" + ps_generate_guid()); + static const CStr guid{ps_generate_guid()}; + gloox::JID clientJid(username + "@" + servername + "/0ad-" + guid); return gloox::Client{clientJid, password}; }