Update sweebridge.py

This commit is contained in:
Nova Cat 2025-01-08 14:23:05 -08:00
parent 8686bfcafe
commit 4975e2d3bc

View file

@ -86,6 +86,7 @@ def parse_content(text:str, platform:int, target:str):
# platform will be the value of the incoming platform, not any outgoing ones.
e = [text]
if platform == 1 and "discord" in config[target]: # Parse IRC -> Discord
try:
members = {}
for i in client2.get_guild(config[target]["discord"]["guild"]).members:
try:
@ -109,6 +110,9 @@ def parse_content(text:str, platform:int, target:str):
if not broken:
temp.append(i) # Aknowledge the typo ;3
e.append("".join(temp))
except:
# Just append the text, don't interrupt the parse.
e.append(text)
else:
e.append(text)
if platform != 3 and "guilded" in config[target]: # Parse IRC -> Guilded:
@ -136,7 +140,7 @@ def ircsession(platform:str, sock:bot_irc):
try:
if text != "":
print([text])
content = ":".join(text.split(":")[2:])
content = ":".join(" ".join(text.split(" ")[1:]).split(":")[1:])
chan = text.split(" ")[2]
nick = text.split(" ")[0][1:].split("!")[0]
except: