public void LogOutgoingPacket(MhfClient client, MhfPacket packet) { if (_setting.LogOutgoingPackets) { MhfLogPacket logPacket = new MhfLogPacket(client.Identity, packet, MhfLogType.PacketOut); WritePacket(logPacket); } }
public void LogUnknownIncomingPacket(MhfClient client, MhfPacket packet) { if (_setting.LogUnknownIncomingPackets) { MhfLogPacket logPacket = new MhfLogPacket(client.Identity, packet, MhfLogType.PacketUnhandled); WritePacket(logPacket); } }
public void LogOutgoingPacket(MhfConnection connection, MhfPacket packet) { MhfClient client = connection.Client; if (client != null) { LogOutgoingPacket(client, packet); return; } if (!_setting.LogIncomingPackets) { return; } MhfLogPacket logPacket = new MhfLogPacket(connection.Identity, packet, MhfLogType.PacketOut); WritePacket(logPacket); }
private void WritePacket(MhfLogPacket packet) { Write(LogLevel.Info, packet, packet.ToLogText()); }