mirror of
https://github.com/osmarks/autobotrobot
synced 2025-04-15 15:23:15 +00:00
zero width space in Discord→IRC nicknames
This commit is contained in:
parent
5019702f62
commit
fe0918120e
@ -33,7 +33,8 @@ async def initialize():
|
||||
if channel_name in util.config["irc"]["channels"]:
|
||||
if channel_name not in joined: conn.join(channel_name)
|
||||
line = msg.message.replace("\n", " ")
|
||||
line = f"<{random_color(msg.author.id)}{msg.author.name}{color_code('')}> " + line.strip()[:400]
|
||||
# ping fix - zero width space embedded in messages
|
||||
line = f"<{random_color(msg.author.id)}{msg.author.name[0]}\u200B{msg.author.name[1:]}{color_code('')}> " + line.strip()[:400]
|
||||
conn.privmsg(channel_name, line)
|
||||
else:
|
||||
logging.warning("IRC channel %s not allowed", channel_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user