From 0c48f1a48a3baefc6ac66ea653f372496e51420e Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 23 May 2019 20:31:39 -0400 Subject: [PATCH] better --- sopel_modules/SpiceBot/Prerun.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sopel_modules/SpiceBot/Prerun.py b/sopel_modules/SpiceBot/Prerun.py index a48e7df..2322bd7 100644 --- a/sopel_modules/SpiceBot/Prerun.py +++ b/sopel_modules/SpiceBot/Prerun.py @@ -97,10 +97,8 @@ class BotPrerun(): hyphen_args = [] trigger_args_unhyphend = [] for worditem in trigger_args_part: - if str(worditem).startswith("--"): - hyphencom = worditem[2:] - if hyphencom in valid_hyphen_args: - hyphen_args.append(hyphencom) + if str(worditem).startswith("--") and worditem[2:] in valid_hyphen_args: + hyphen_args.append(worditem[2:]) else: trigger_args_unhyphend.append(worditem) if len(hyphen_args):