From d98af55a0480091c2e8fd54d22f1bdba980d6d1f Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 19 Jun 2019 08:03:24 -0400 Subject: [PATCH 1/2] identifiers --- sopel_modules/SpiceBot/Sherlock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sopel_modules/SpiceBot/Sherlock.py b/sopel_modules/SpiceBot/Sherlock.py index 43b6dfa..00efe7f 100644 --- a/sopel_modules/SpiceBot/Sherlock.py +++ b/sopel_modules/SpiceBot/Sherlock.py @@ -31,10 +31,13 @@ class Sherlock(): self.dict[social_network]["cache"] = dict() def check_network(self, username, social_network): + username = str(username) if username in list(self.dict[social_network]["cache"].keys()): if time.time() - self.dict[social_network]["cache"][username]["time"] <= 1800: return self.dict[social_network]["cache"][username]["exists"] + else: + self.dict[social_network]["cache"][username] = dict() url = self.dict.get(social_network).get("url").format(username) error_type = self.dict.get(social_network).get("errorType") From abfb3a8eedf0ac3b3b412138065f9f76765a9dac Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 19 Jun 2019 08:04:47 -0400 Subject: [PATCH 2/2] lower --- sopel_modules/SpiceBot/Sherlock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sopel_modules/SpiceBot/Sherlock.py b/sopel_modules/SpiceBot/Sherlock.py index 00efe7f..a5e66f2 100644 --- a/sopel_modules/SpiceBot/Sherlock.py +++ b/sopel_modules/SpiceBot/Sherlock.py @@ -31,7 +31,7 @@ class Sherlock(): self.dict[social_network]["cache"] = dict() def check_network(self, username, social_network): - username = str(username) + username = str(username).lower() if username in list(self.dict[social_network]["cache"].keys()): if time.time() - self.dict[social_network]["cache"][username]["time"] <= 1800: