mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 00:20:54 +01:00
29 lines
592 B
C
29 lines
592 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
using TiltedPhoques::ConnectionId_t;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief Wrapper for admin messages.
|
||
|
|
*/
|
||
|
|
template <class T> struct AdminPacketEvent
|
||
|
|
{
|
||
|
|
AdminPacketEvent(T* aPacket, ConnectionId_t aConnectionId)
|
||
|
|
: Packet(*aPacket)
|
||
|
|
, ConnectionId(aConnectionId)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
constexpr AdminPacketEvent(const AdminPacketEvent& acRhs) = default;
|
||
|
|
|
||
|
|
constexpr AdminPacketEvent& operator=(const AdminPacketEvent& acRhs)
|
||
|
|
{
|
||
|
|
Packet = acRhs.Packet;
|
||
|
|
ConnectionId = acRhs.ConnectionId;
|
||
|
|
|
||
|
|
return *this;
|
||
|
|
}
|
||
|
|
|
||
|
|
T& Packet;
|
||
|
|
ConnectionId_t ConnectionId;
|
||
|
|
};
|