Straightforward toString

This commit is contained in:
Him188 2019-11-08 20:15:11 +08:00
parent 553283ef7d
commit a45470a0b9
2 changed files with 4 additions and 1 deletions

View File

@ -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> {

View File

@ -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>
}