Commit a45470a0 authored by Him188's avatar Him188

Straightforward toString

parent 553283ef
......@@ -14,7 +14,9 @@ import net.mamoe.mirai.utils.io.toUHexString
data class UnknownEventPacket(
val id: UShort,
val body: ByteReadPacket
) : EventPacket
) : EventPacket {
override fun toString(): String = "UnknownEventPacket(id=${id.toUHexString()})"
}
//TODO This class should be declared with `inline`, but a CompilationException will be thrown
class UnknownEventParserAndHandler(override val id: UShort) : EventParserAndHandler<UnknownEventPacket> {
......
......@@ -255,6 +255,7 @@ object SubmitPasswordPacket : PacketFactory<SubmitPasswordPacket.LoginResponse,
inline class SessionResponseDecryptionKey(private val delegate: IoBuffer) : Decrypter {
override fun decrypt(packet: ByteReadPacket): ByteReadPacket = packet.decryptBy(delegate)
override fun toString(): String = "SessionResponseDecryptionKey"
companion object Type : DecrypterType<SessionResponseDecryptionKey>
}
......
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