mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-01 12:06:10 +08:00
[core] Implement correct TlvMap dump for unrecognized login errors
This commit is contained in:
parent
0a60535d46
commit
2accabef9e
@ -238,11 +238,17 @@ internal class WtLogin {
|
|||||||
// 1, 15 -> onErrorMessage(tlvMap) ?: error("Cannot find error message")
|
// 1, 15 -> onErrorMessage(tlvMap) ?: error("Cannot find error message")
|
||||||
else -> {
|
else -> {
|
||||||
onErrorMessage(type.toInt(), tlvMap, bot)
|
onErrorMessage(type.toInt(), tlvMap, bot)
|
||||||
?: error("Cannot find error message, unknown login result type: $type, TLVMap = ${tlvMap.structureToString()}")
|
?: error(
|
||||||
|
"Cannot find error message, unknown login result type: $type, TLVMap = ${dumpTlvMap(tlvMap)}"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun dumpTlvMap(tlvMap: TlvMap) {
|
||||||
|
tlvMap.entries.joinToString { "${it.key}=${it.value.toUHexString()}" }
|
||||||
|
}
|
||||||
|
|
||||||
private fun onDevLockLogin(
|
private fun onDevLockLogin(
|
||||||
tlvMap: TlvMap,
|
tlvMap: TlvMap,
|
||||||
bot: QQAndroidBot
|
bot: QQAndroidBot
|
||||||
|
Loading…
Reference in New Issue
Block a user