From f0c33251413f6ab5500930f4ad30da4696c15801 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Mon, 14 Aug 2023 18:33:24 +0200 Subject: [PATCH] name randomizer --- src/client/ClientConnexion.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/ClientConnexion.cpp b/src/client/ClientConnexion.cpp index db98698..53d1675 100644 --- a/src/client/ClientConnexion.cpp +++ b/src/client/ClientConnexion.cpp @@ -7,6 +7,8 @@ #include "td/protocol/packets/PlayerLoginPacket.h" #include "td/protocol/packets/ServerTpsPacket.h" +#include "td/misc/Random.h" + namespace td { namespace client { @@ -38,7 +40,7 @@ void ClientConnexion::HandlePacket(const protocol::ServerTpsPacket* packet) { } void ClientConnexion::Login() { - td::protocol::PlayerLoginPacket loginPacket("Persson" + std::to_string(static_cast(m_ConnectionID))); + td::protocol::PlayerLoginPacket loginPacket("Persson#" + std::to_string(utils::GetRandomInt(0, 9999))); SendPacket(&loginPacket); }