MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ServerSendAuth

Method ServerSendAuth

src/openrct2/network/NetworkBase.cpp:1446–1464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1444 }
1445
1446 void NetworkBase::ServerSendAuth(Connection& connection)
1447 {
1448 uint8_t new_playerid = 0;
1449 if (connection.player != nullptr)
1450 {
1451 new_playerid = connection.player->id;
1452 }
1453 Packet packet(Command::auth);
1454 packet << static_cast<uint32_t>(connection.authStatus) << new_playerid;
1455 if (connection.authStatus == Auth::badVersion)
1456 {
1457 packet.writeString(GetVersion());
1458 }
1459 connection.queuePacket(std::move(packet));
1460 if (connection.authStatus != Auth::ok && connection.authStatus != Auth::requirePassword)
1461 {
1462 connection.disconnect();
1463 }
1464 }
1465
1466 void NetworkBase::ServerSendMap(Connection* connection)
1467 {

Callers

nothing calls this directly

Calls 4

queuePacketMethod · 0.80
disconnectMethod · 0.80
GetVersionFunction · 0.70
writeStringMethod · 0.45

Tested by

no test coverage detected