get rid of the MessageDistributor module... & update discord, to work with API v10

Added discord commands (issue: as they're running over the event hub, they're processed on the same track as other events. => activity ingame triggers the next run; otherwise there's some delay for responses)
relay is a standard module now.
This commit is contained in:
2022-04-15 17:05:30 +02:00
parent fd84d82af2
commit a3a26f2ba4
32 changed files with 1036 additions and 729 deletions
+3 -3
View File
@@ -39,11 +39,11 @@ class OnlineDisplay:
if org > 0:
postfix.append(f"<notice>Org: {org}</notice>")
if priv > 0:
postfix.append(f"<highlight>Priv: {priv}</notice>")
postfix.append(f"<notice>Priv: {priv}</notice>")
if notify > 0:
postfix.append(f"<notice>Buddylist: {notify}</notice>")
blob = ChatBlob(title, blob, suffix=f" ({f', '.join(postfix)})")
return blob
return blob if (org+priv+notify) != 0 else "There's nobody online."
def format_by_channel_main(self, query, params):
query += "order by channel_id, main_name, p.name=main_name, p.name, r_id"
@@ -161,7 +161,7 @@ class OnlineDisplay:
if org_id != temp_blob[key]["id"]:
org_id = temp_blob[key]["id"]
blob += f"\n<pagebreak><highlight>{temp_blob[key]['name']}</highlight>" \
f"<header> ({len(temp_blob[key]['online']): >3} " \
f" <header>({len(temp_blob[key]['online']): >3} " \
f"| {len(temp_blob[key]['online']) / len(query) * 100:.2f}%)</header>\n"
blob += self.format_org(user)
return blob, 0, 0, len(query)