mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 09:50:16 +08:00
Uint type
This commit is contained in:
parent
a5995007eb
commit
27f52e6b07
@ -270,17 +270,18 @@ internal object LoginPacket : PacketFactory<LoginPacket.LoginPacketResponse>("wt
|
|||||||
|
|
||||||
val subCommand = readUShort().toInt()
|
val subCommand = readUShort().toInt()
|
||||||
println("subCommand=$subCommand")
|
println("subCommand=$subCommand")
|
||||||
val type = readByte()
|
val type = readUByte()
|
||||||
println("type=$type")
|
println("type=$type")
|
||||||
|
|
||||||
discardExact(2)
|
discardExact(2)
|
||||||
val tlvMap: TlvMap = this.readTLVMap()
|
val tlvMap: TlvMap = this.readTLVMap()
|
||||||
|
tlvMap.printTLVMap()
|
||||||
return when (type.toInt()) {
|
return when (type.toInt()) {
|
||||||
0 -> onLoginSuccess(tlvMap, bot)
|
0 -> onLoginSuccess(tlvMap, bot)
|
||||||
1, 15 -> onErrorMessage(tlvMap)
|
1, 15 -> onErrorMessage(tlvMap)
|
||||||
2 -> onSolveLoginCaptcha(tlvMap, bot)
|
2 -> onSolveLoginCaptcha(tlvMap, bot)
|
||||||
-96 -> onUnsafeDeviceLogin(tlvMap)
|
160 /*-96*/ -> onUnsafeDeviceLogin(tlvMap)
|
||||||
-52 /*0xCC=204*/ -> onSMSVerifyNeeded(tlvMap, bot)
|
204 /*-52*/ -> onSMSVerifyNeeded(tlvMap, bot)
|
||||||
else -> error("unknown login result type: $type")
|
else -> error("unknown login result type: $type")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user