diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt b/mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt index 7f882cf15e..da0ab4bc8c 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt @@ -283,8 +283,13 @@ internal class WtLogin { val t172 = t161[0x172] if (t172 != null) { - bot.client.rollbackSig = t172 + if (t172.contentEquals(bot.client.rollbackSig)) { + return LoginPacketResponse.Error(bot, 0x146, "login failed", + "login result type 180 with same t172 as the client's", "") + } + runCatching { + bot.client.rollbackSig = t172 bot.components[KeyRefreshProcessor].refreshKeysNow(bot.network) }.fold( onSuccess = { return LoginPacketResponse.Success(bot) },