syriiin / irc-to-discord Goto Github PK
View Code? Open in Web Editor NEWIRC to Discord and vise-versa chat relay
License: MIT License
IRC to Discord and vise-versa chat relay
License: MIT License
^
Another one we came up with: Reply to @user
badge.
Currently misinterprets messages that use canceling syntax.
Right now
this is 0x02bold0x02 and this is not
results in
this is bold and this is not
when it should be
this is bold and this is not
Should rewrite irc -> discord formatter to support this syntax.
Examples: https://modern.ircdocs.horse/formatting.html#examples
The markdown->irc is quite buggy, and formats things it shouldn't (anything math, or anything with underscores breaks down).
I suggest just disabling it and sending it as-is, which is better than incorrectly formatted strings.
`*this* should not be bold but will be on irc`
Zero width spaces are added by the bridge to the author of discord messages when relaying to irc in order to prevent unintended mention notifications for irc users who have the same username as a discord user who sends a message.
It makes sense that the bridge should filter out these zero width spaces again before processing them for discord as they might be accidentally included in usernames where a discord mention is intended.
eg. irc user copy pastes a discord username from the bridge's message and tries to mention the discord user by adding an @ to the beginning. No mention will occur because the zero width space was copied along with the username.
Should probably only strip zero width spaces where there would otherwise be a mention match, but it probably wont matter much if all zero width spaces are purged regardless.
Would prefer to make this more flexible and by allowing for a given set of configuration options to be applied to specific users.
A config something like
{
"irc": {
// ...
"formatting": {
// ... default settings ...
}
},
"discord": {
// ...
"formatting": {
// default settings
// ...
"suppressEmbeds": false,
"overrides": [
{
"users": [
// irc users to apply these settings to messages from
"Renol"
],
"settings": {
"suppressEmbeds": true
}
}
]
}
}
// ...
}
ZWJ was removed in reply nick so it could ping when replying to IRC users, but when replying to Discord users it should stay.
If send a message on Discord and someone replies to it, it pings me on IRC as well.
I think this should do the trick:
header = f"<{format_name(author)} \u2192 {format_name(reply_name, replied_message.author != self.user)}> "
Irc users should be able to use @ nickname syntax to generate a real discord mention for matching discord names.
Request to support sedbot style message edits with regex substitution.
On IRC it looks like this:
22:24 <> <Kowiz> https://twitter.com/richgel999/status/1330767132003606528
22:24 <> <Kowiz> Embed.Empty: https://twitter.com/richgel999/status/1330767132003606528
Add a config option or even runtime configurable option to add discord or irc bridges to a whitelist where their message is either sent as is (and not prefixed with the bots name), or reparsed to use the name inside the message instead of the bot.
This can be an alternative option to #8 where an external service only needs to talk to irc OR discord, and the existing irc-to-discord bridge will make that service serve both protocols
title^
hangs because the http post request doesnt timeout and blocks.
can fix hangs by switching out requests for grequests
also should handle errors in the case the http post fails so there is some feedback
If an image is uploaded with long text, it creates discohook, would be nice to also put the image in there.
List in config file for discord admins.
Might do IRC list later.
Commands:
IRC max message length is 512 bytes including PRIVMSG command, etc..
Should probably truncate messages and hastebin the full message
python irc-to-discord.py
File "irc-to-discord.py", line 33
SyntaxError: Non-ASCII character '\xe3' in file irc-to-discord.py on line 33, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Add a config option or even runtime configurable option to add discord or irc users into an ignore list, and their messages won't get bridged.
This can come in handy if an external service is sending messages to both irc and discord, and don't want duplicate messages
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.