mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-25 23:10:12 +08:00
[core] handle login result 180
This commit is contained in:
parent
93ccce16d8
commit
60f1e79e49
@ -241,6 +241,8 @@ internal class WtLogin {
|
||||
// 40: blocked
|
||||
// 161: 今日操作次数过多,请等待一天后再试。 (SMS)
|
||||
// 162: 可能也是 SMS 太频繁
|
||||
// 180:可能是需要换服务器 IP
|
||||
180 -> onChangeServerIpv6(tlvMap, bot)
|
||||
204 /*-52*/ -> onDevLockLogin(tlvMap, bot)
|
||||
// 1, 15 -> onErrorMessage(tlvMap) ?: error("Cannot find error message")
|
||||
else -> {
|
||||
@ -256,6 +258,18 @@ internal class WtLogin {
|
||||
return tlvMap.entries.joinToString { "${it.key}=${it.value.toUHexString()}" }
|
||||
}
|
||||
|
||||
// temporary function name
|
||||
private fun onChangeServerIpv6(
|
||||
tlvMap: TlvMap,
|
||||
bot: QQAndroidBot
|
||||
): LoginPacketResponse.Error {
|
||||
tlvMap[0x161]?.let { bot.client.analysisTlv161(it) }
|
||||
|
||||
return onErrorMessage(0x146, tlvMap, bot)
|
||||
?: LoginPacketResponse.Error(bot, 0x146, "login failed",
|
||||
"login result type 180 without error message", "")
|
||||
}
|
||||
|
||||
private fun onDevLockLogin(
|
||||
tlvMap: TlvMap,
|
||||
bot: QQAndroidBot
|
||||
|
Loading…
Reference in New Issue
Block a user