This commit is contained in:
deathbybandaid 2019-07-04 09:35:51 -04:00
parent 021e50a8db
commit 231e29f199
2 changed files with 17 additions and 4 deletions

View File

@ -16,7 +16,9 @@ class BotServer():
"host": botconfig.core.host,
}
self.isupport = {
"TARGMAX": {},
"TARGMAX": {
"KICK": 1,
},
}
def __getattr__(self, name):
@ -24,6 +26,8 @@ class BotServer():
"""We will try to find a dict value, or return None"""
if name.lower() in list(self.dict.keys()):
return self.dict[str(name).lower()]
elif name.lower() in list(self.isupport.keys()):
return self.dict[str(name).lower()]
else:
raise Exception('Server dict does not contain a function or key ' + str(name.lower()))
@ -40,11 +44,18 @@ class BotServer():
for param in parameters:
# check for value associated with the parameter
if '=' in param:
if '=' not in param:
self.isupport[param] = None
else:
key, raw_value = param.split('=')
# Only gather parameters that we want
if key in list(self.isupport.keys()):
if ',' not in raw_value:
self.isupport[key] = raw_value
else:
settings = str(raw_value).split(',')
for setting in settings:
settingname, setting_value = param.split('=')
if key.upper() == "TARGMAX":

View File

@ -30,4 +30,6 @@ def parse_event_005(bot, trigger):
for setting in settings:
bot.osd([str(key), "includes", str(setting)], "#deathbybandaid")
else:
if not raw_value:
raw_value = None
bot.osd([str(key), "=", str(raw_value)], "#deathbybandaid")