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)