From c96de59e44f42ce7ab7b18cfc59c4404d1a56ab6 Mon Sep 17 00:00:00 2001 From: swee Date: Wed, 1 Jan 2025 17:21:14 -0800 Subject: [PATCH] Update sweebridge.py --- sweebridge.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sweebridge.py b/sweebridge.py index 6356644..49262b5 100644 --- a/sweebridge.py +++ b/sweebridge.py @@ -215,6 +215,10 @@ def ircsession(platform:str, sock:bot_irc): for key, value in userlist.items(): if nick in value: target = targets[platform][key] + guilded_enable = "guilded" in config[target] + discord_enable = "discord" in config[target] + gilwebhook = config[target]["guilded"]["webhook"] if guilded_enable else None + discwebhook = config[target]["discord"]["webhook"] if discord_enable else None if guilded_enable: hook(gilwebhook, json={"content": nick + " Has quit for reason \"" + " ".join(text.split(" ")[2:])[1:] + "\"", "username": "SweeBridge IRC", "avatar_url": "https://git.swee.codes/swee/SweeBridge/raw/branch/main/logos/sweebridge-" + platform + ".png"}) if discord_enable: hook(discwebhook, json={"content": nick + " Has quit for reason \"" + " ".join(text.split(" ")[2:])[1:] + "\"", "username": "SweeBridge IRC", "avatar_url": "https://git.swee.codes/swee/SweeBridge/raw/branch/main/logos/sweebridge-" + platform + ".png"}) update(channel_irc, sock)