mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-10 03:56:56 +00:00
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.
This commit is contained in:
@@ -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};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user