feat(spike): add logging and handling for KickNT command in bridge and session

This commit is contained in:
DrSmoothl committed 2026-06-16 00:34:03 +08:00
1 parent 6003acac56
commit 300fa70148
3 files changed
+21 -1

No files matched your search

+5 -1
View File
@@ -402,7 +402,11 @@ export class HookSession extends EventEmitter {
}
private handlePacket(packet: QqHookPacket): void {
if (!this.loggedIn) return;
// ── SPIKE PROBE (亡语 Q2) — 验完即删: KickNT 必须在 loggedIn 翻 false 后仍放行 ──
const __spikeKick = packet.cmd === 'trpc.qq_new_tech.status_svc.StatusService.KickNT';
if (__spikeKick) this.log.warn('[SPIKE] KickNT@pipe T0pipe=%d PID=%d loggedIn=%s', Date.now(), this.pid, this.loggedIn);
if (!this.loggedIn && !__spikeKick) return; // SPIKE: 原为 `if (!this.loggedIn) return;`
// ── /SPIKE PROBE ──
const uin = packet.uin || this._uin;
if (!isRealUin(uin)) return;
if (!this.onPacket) return;