diff --git a/fishy/engine/common/window.py b/fishy/engine/common/window.py index e28310d..53409a7 100644 --- a/fishy/engine/common/window.py +++ b/fishy/engine/common/window.py @@ -33,7 +33,6 @@ class WindowClient: WindowClient.clients.remove(self) if len(WindowClient.clients) == 0: window_server.stop() - logging.info("window server stopped") @staticmethod def running(): diff --git a/fishy/engine/semifisher/fishing_event.py b/fishy/engine/semifisher/fishing_event.py index 0381a19..2f2263b 100644 --- a/fishy/engine/semifisher/fishing_event.py +++ b/fishy/engine/semifisher/fishing_event.py @@ -162,8 +162,12 @@ def on_loot(): def on_fight(): - logging.info("FIGHTING") + msg = "FIGHTING!" + logging.info(msg) + web.send_notification(msg) def on_dead(): - logging.info("DEAD or INVENTORY FULL or NO BAIT EQUIPPED") + msg = "DEAD or INVENTORY FULL or NO BAIT EQUIPPED" + logging.info(msg) + web.send_notification(msg) diff --git a/fishy/web/web.py b/fishy/web/web.py index a6b30e6..42b7fc3 100644 --- a/fishy/web/web.py +++ b/fishy/web/web.py @@ -51,12 +51,11 @@ def register_user(new_uid): @fallback(None) -def send_notification(uid, message): - # todo clean dead code - if not is_subbed(uid): +def send_notification(message): + if not is_subbed(): return False - body = {"uid": uid, "message": message, "apiversion":apiversion} + body = {"uid": config.get("uid"), "message": message, "apiversion":apiversion} requests.post(urls.notify, json=body)