1
mirror of git://git.acid.vegas/IRCP.git synced 2024-11-22 16:06:41 +00:00

Fixed parser not handling booleans

This commit is contained in:
Dionysus 2023-05-30 03:37:20 -04:00
parent 5718d80b0c
commit b39be50b01
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -10,6 +10,8 @@ def parse(option, data, raw=True):
data = ' '.join(line.split()[3:])
if data[:1] == ':':
data = data[1:]
if type(data) == bool:
data = str(data)
print(data.replace(option, f'\033[31m{option}\033[0m'))
return data
@ -35,7 +37,7 @@ if len(sys.argv) >= 2:
found.append(parse(option, data, raw))
elif type(data) == list:
for item in data:
found.append(option, parse(item, raw))
found.append(parse(option, item, raw))
else:
for item in data:
_data = data[item]