Milestone: Modular SHA-256 SQLite WAL audit core, external Discord embed template, and decoupled permissions bus

This commit is contained in:
FlexiCraft Admin 2026-11-27 02:38:32 +00:00
parent 63efb6a831
commit 09ad20d99a
2 changed files with 31 additions and 2 deletions

View file

@ -39,8 +39,10 @@ def _notify_discord_socket(event_id: int):
if not os.path.exists(AUDIT_SOCK):
return
try:
with socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) as s:
s.sendto(str(event_id).encode("utf-8"), AUDIT_SOCK)
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s:
s.settimeout(1.0)
s.connect(AUDIT_SOCK)
s.sendall(f"{event_id}\n".encode("utf-8"))
except Exception:
pass