Update 'gen_stats'
This was hard to mess with indents. Why, ben, why?
This commit is contained in:
parent
87ef4d25e3
commit
22f596ab4d
|
@ -2,6 +2,10 @@
|
|||
import requests, json
|
||||
import xml.etree.ElementTree as xml
|
||||
|
||||
try:
|
||||
with open("blacklist.json") as f:
|
||||
BLACKLIST = json.load(f)["blacklist"]
|
||||
|
||||
r = requests.get("http://localhost:8081/stats")
|
||||
r.raise_for_status()
|
||||
out = {}
|
||||
|
@ -35,8 +39,8 @@ for schannel in schannels:
|
|||
and channel["topic"] != "No topic set"
|
||||
):
|
||||
channel["topic"] = "Topic hidden"
|
||||
if channel["name"] == "#secret-sudoers":
|
||||
# no stat output for #secret-sudoers! it's a sekrit club of the ~team sysadmins!
|
||||
if channel["name"] in BLACKLIST:
|
||||
# no stat output for blacklisted channels!!!!
|
||||
continue
|
||||
channel["webchatlink"] = "https://web.tilde.chat/?join=" + channel["name"].lstrip(
|
||||
"#"
|
||||
|
|
Loading…
Reference in New Issue