diff --git a/sopel_modules/SpiceBot/Server.py b/sopel_modules/SpiceBot/Server.py index 926119e..3444c2d 100644 --- a/sopel_modules/SpiceBot/Server.py +++ b/sopel_modules/SpiceBot/Server.py @@ -41,11 +41,15 @@ class BotServer(): # check for value associated with the parameter if '=' in param: - paramname = str(param).split('=')[0] - if param in list(self.isupport.keys()): - if param.startswith("TARGMAX"): - param = str(param).split('=')[1] - settings = str(param).split(',') + key, raw_value = param.split('=') + + # Only gather parameters that we want + if key in list(self.isupport.keys()): + + if key.upper() == "TARGMAX": + + # split the settings by comma seperation + settings = str(raw_value).split(',') for setting in settings: settingname = str(setting).split(':')[0] if settingname.upper() in ['NOTICE', 'PRIVMSG']: diff --git a/sopel_modules/SpiceBot_Core_Processing/Server.py b/sopel_modules/SpiceBot_Core_Processing/Server.py index 8fedef1..a78669b 100644 --- a/sopel_modules/SpiceBot_Core_Processing/Server.py +++ b/sopel_modules/SpiceBot_Core_Processing/Server.py @@ -24,6 +24,10 @@ def parse_event_005(bot, trigger): parameters = trigger.args[1:-1] for param in parameters: if '=' in param: - paramname = str(param).split('=')[0] - paramvalue = str(param).split('=')[1] - bot.osd([str(paramname), "=", str(paramvalue)], "#deathbybandaid") + key, raw_value = param.split('=') + if ',' not in raw_value: + settings = str(raw_value).split(',') + for setting in settings: + bot.osd([str(key), "includes", str(setting)], "#deathbybandaid") + else: + bot.osd([str(key), "=", str(raw_value)], "#deathbybandaid")