Commit bf91d378 authored by Him188's avatar Him188

Move "Received commandName" log

parent f82f0ed9
...@@ -229,6 +229,7 @@ internal object KnownPacketFactories { ...@@ -229,6 +229,7 @@ internal object KnownPacketFactories {
}?.let { }?.let {
// 处理内层真实的包 // 处理内层真实的包
if (it.packetFactory == null) { if (it.packetFactory == null) {
bot.logger.debug("Received commandName: ${it.commandName}")
PacketLogger.warning { "找不到 PacketFactory" } PacketLogger.warning { "找不到 PacketFactory" }
PacketLogger.verbose { "传递给 PacketFactory 的数据 = ${it.data.useBytes { data, length -> data.toUHexString(length = length) }}" } PacketLogger.verbose { "传递给 PacketFactory 的数据 = ${it.data.useBytes { data, length -> data.toUHexString(length = length) }}" }
return return
...@@ -270,7 +271,8 @@ internal object KnownPacketFactories { ...@@ -270,7 +271,8 @@ internal object KnownPacketFactories {
class IncomingPacket( class IncomingPacket(
val packetFactory: PacketFactory<*>?, val packetFactory: PacketFactory<*>?,
val sequenceId: Int, val sequenceId: Int,
val data: ByteReadPacket val data: ByteReadPacket,
val commandName: String
) )
/** /**
...@@ -340,8 +342,8 @@ internal object KnownPacketFactories { ...@@ -340,8 +342,8 @@ internal object KnownPacketFactories {
// body // body
val packetFactory = findPacketFactory(commandName) val packetFactory = findPacketFactory(commandName)
bot.logger.debug("Received commandName: $commandName")
return IncomingPacket(packetFactory, ssoSequenceId, packet) return IncomingPacket(packetFactory, ssoSequenceId, packet, commandName)
} }
private suspend fun <T : Packet> ByteReadPacket.parseOicqResponse( private suspend fun <T : Packet> ByteReadPacket.parseOicqResponse(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment