From 5d9aa4b25ecf744c86c7f917358936956cc5b4a8 Mon Sep 17 00:00:00 2001 From: swee Date: Wed, 8 Jan 2025 14:15:41 -0800 Subject: [PATCH] Update sweebridge.py --- sweebridge.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sweebridge.py b/sweebridge.py index fab29d4..d297a9b 100644 --- a/sweebridge.py +++ b/sweebridge.py @@ -106,7 +106,17 @@ def parse_content(text:str, platform:int, target:str): e.append("".join(temp)) else: e.append(text) - e.append(text) + if platform == 2 and "guilded" in config[target]: # Parse IRC -> Guilded: + # Links workaround for Guilded + temp = "" + parsed = text.split(" ") + for index, i in parsed.enumerate(): + if "http://" in i or "https://" in i: + parsed[index] = f"[{i}]({i})" + temp = " ".join(parsed) + e.append(temp) + else: + e.append(text) e.append(text) return e def ircsession(platform:str, sock:bot_irc):