fix: /c → /silent-command (게임 콘솔 스팸 방지)

/c는 모든 명령을 게임 콘솔에 표시함
/silent-command는 동일하게 동작하되 콘솔에 표시 안 함
This commit is contained in:
2026-03-25 20:36:25 +09:00
parent 7953047212
commit b58e30d3f6

View File

@@ -43,8 +43,8 @@ class FactorioRCON:
self.sock = None self.sock = None
def run(self, lua_command: str) -> str: def run(self, lua_command: str) -> str:
"""Lua 명령 실행 후 결과 반환""" """Lua 명령 실행 후 결과 반환 (silent-command로 콘솔 스팸 방지)"""
cmd = f"/c {lua_command}" cmd = f"/silent-command {lua_command}"
req_id = self._send_packet(2, cmd) # type 2 = EXECCOMMAND req_id = self._send_packet(2, cmd) # type 2 = EXECCOMMAND
result = self._recv_packet() result = self._recv_packet()
return result.get("body", "").strip() return result.get("body", "").strip()