Skip to content

Commit 555d6a1

Browse files
committed
fix: 클립보드 잔여물로 인한 이중 강화 버그 수정 (v2.9.0)
sendCommand의 TypeText가 클립보드에 명령어를 남기고, ReadChatText의 Cmd+A→Cmd+C가 간헐적으로 실패하여 매 사이클 /강화가 2회 전송되던 문제 수정. readChatClipboard에서 50자 미만 텍스트를 잔여물로 판단하여 무시.
1 parent 54bedc8 commit 555d6a1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

cmd/sword-macro/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func init() {
1919
runtime.LockOSThread()
2020
}
2121

22-
const VERSION = "2.8.9"
22+
const VERSION = "2.9.0"
2323

2424
func main() {
2525
// Windows 콘솔 ANSI 지원 활성화 및 UTF-8 설정

internal/game/engine.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,14 @@ func (e *Engine) readChatClipboard() string {
16261626
// 채팅 영역에서 텍스트 읽기 (전체선택 → 복사 → 클립보드)
16271627
text := input.ReadChatText(chatClickX, chatClickY, inputX, inputY)
16281628

1629+
// 클립보드 잔여물 감지: sendCommand의 TypeText가 Cmd+V용으로 클립보드에
1630+
// 명령어 텍스트("/강화", "/판매" 등)를 남김. ReadChatText의 Cmd+A→Cmd+C가
1631+
// 간헐적으로 실패하면 이전 명령어가 클립보드에 남아있게 됨.
1632+
// 실제 카카오톡 채팅 텍스트는 날짜 헤더("2026년 X월 X일") + 메시지로 항상 50자 이상.
1633+
if text != "" && len(text) < 50 {
1634+
return ""
1635+
}
1636+
16291637
if text == "" {
16301638
fmt.Println(" ⚠️ 클립보드 텍스트 비어있음")
16311639
}

0 commit comments

Comments
 (0)