publish eve_chat_watcher.py
This commit is contained in:
parent
172a3e11cb
commit
c8521a2d43
1 changed files with 5 additions and 3 deletions
|
|
@ -60,11 +60,13 @@ def main():
|
||||||
priority="high", tags="speech_balloon")
|
priority="high", tags="speech_balloon")
|
||||||
return
|
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)
|
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'}")
|
print(f"[chat] watching {channels} in {d}; keywords={keywords or 'ALL'}")
|
||||||
w.heartbeat(cp, "chat")
|
|
||||||
|
|
||||||
handles = {} # channel -> (path, fh)
|
handles = {} # channel -> (path, fh)
|
||||||
last = {} # channel -> last alert time
|
last = {} # channel -> last alert time
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue