1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 04:19:55 +00:00
openmw-tes3mp/components/openmw-mp/Packets/System/PacketSystemHandshake.cpp

23 lines
584 B
C++
Raw Normal View History

#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketSystemHandshake.hpp"
using namespace mwmp;
PacketSystemHandshake::PacketSystemHandshake(RakNet::RakPeerInterface *peer) : SystemPacket(peer)
{
packetID = ID_SYSTEM_HANDSHAKE;
orderChannel = CHANNEL_SYSTEM;
}
void PacketSystemHandshake::Packet(RakNet::BitStream *bs, bool send)
{
SystemPacket::Packet(bs, send);
if (!RW(system->playerName, send, true, maxNameLength) ||
!RW(system->serverPassword, send, true, maxPasswordLength))
{
packetValid = false;
return;
}
}