Example #1
0
 public void LogOutgoingPacket(MhfClient client, MhfPacket packet)
 {
     if (_setting.LogOutgoingPackets)
     {
         MhfLogPacket logPacket = new MhfLogPacket(client.Identity, packet, MhfLogType.PacketOut);
         WritePacket(logPacket);
     }
 }
Example #2
0
 public void LogUnknownIncomingPacket(MhfClient client, MhfPacket packet)
 {
     if (_setting.LogUnknownIncomingPackets)
     {
         MhfLogPacket logPacket = new MhfLogPacket(client.Identity, packet, MhfLogType.PacketUnhandled);
         WritePacket(logPacket);
     }
 }
Example #3
0
        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);
        }
Example #4
0
 private void WritePacket(MhfLogPacket packet)
 {
     Write(LogLevel.Info, packet, packet.ToLogText());
 }