From a887494e239c3635744ccc0756290bfd65d204c2 Mon Sep 17 00:00:00 2001 From: MerlionRock Date: Wed, 2 Aug 2017 16:49:22 +0800 Subject: [PATCH 1/2] Optional hashendpoint Optional hashendpoint --- pokecli.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pokecli.py b/pokecli.py index 4d8eef1737..0c7f672267 100644 --- a/pokecli.py +++ b/pokecli.py @@ -416,6 +416,14 @@ def _json_loader(filename): help="Username", default=None ) + add_config( + parser, + load, + short_flag="-hp", + long_flag="--hashendpoint", + help="hashendpoint", + default=None + ) add_config( parser, load, From cfa8a4b7930b6c5f731c2146d609012c6057162f Mon Sep 17 00:00:00 2001 From: MerlionRock Date: Wed, 2 Aug 2017 16:50:02 +0800 Subject: [PATCH 2/2] Optional hashendpoint Optional hashendpoint --- pokemongo_bot/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pokemongo_bot/__init__.py b/pokemongo_bot/__init__.py index 2596b741d9..62d094b66e 100644 --- a/pokemongo_bot/__init__.py +++ b/pokemongo_bot/__init__.py @@ -139,6 +139,10 @@ def __init__(self, db, config): self.inventory_refresh_threshold = 10 self.inventory_refresh_counter = 0 self.last_inventory_refresh = time.time() + + # Allow user to change hash service + if self.config.hashendpoint: + HashServer.endpoint = self.config.hashendpoint # Catch on/off self.catch_disabled = False