mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 00:50:37 +08:00
Move "Received commandName" log
This commit is contained in:
parent
f82f0ed96a
commit
bf91d3780b
@ -229,6 +229,7 @@ internal object KnownPacketFactories {
|
||||
}?.let {
|
||||
// 处理内层真实的包
|
||||
if (it.packetFactory == null) {
|
||||
bot.logger.debug("Received commandName: ${it.commandName}")
|
||||
PacketLogger.warning { "找不到 PacketFactory" }
|
||||
PacketLogger.verbose { "传递给 PacketFactory 的数据 = ${it.data.useBytes { data, length -> data.toUHexString(length = length) }}" }
|
||||
return
|
||||
@ -270,7 +271,8 @@ internal object KnownPacketFactories {
|
||||
class IncomingPacket(
|
||||
val packetFactory: PacketFactory<*>?,
|
||||
val sequenceId: Int,
|
||||
val data: ByteReadPacket
|
||||
val data: ByteReadPacket,
|
||||
val commandName: String
|
||||
)
|
||||
|
||||
/**
|
||||
@ -340,8 +342,8 @@ internal object KnownPacketFactories {
|
||||
// body
|
||||
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(
|
||||
|
Loading…
Reference in New Issue
Block a user