publish eve_chat_watcher.py

This commit is contained in:
brockdarnold 2026-06-14 17:00:33 +00:00
parent 172a3e11cb
commit c8521a2d43

View file

@ -60,11 +60,13 @@ def main():
priority="high", tags="speech_balloon")
return
w.heartbeat(cp, "chat") # announce we're alive first
d = find_dir(cp)
while not d: # wait for EVE to create the logs
print("[chat] no Chatlogs dir yet (EVE not started?) — retrying in 30s")
time.sleep(30)
d = find_dir(cp)
if not d:
sys.exit("No Chatlogs dir. Set [chat] chatlogs_dir in config.ini.")
print(f"[chat] watching {channels} in {d}; keywords={keywords or 'ALL'}")
w.heartbeat(cp, "chat")
handles = {} # channel -> (path, fh)
last = {} # channel -> last alert time