Giter Site home page Giter Site logo

dis4irc's Introduction

Dis4IRC

A modern Discord <-> IRC Bridge

Published under the MIT License.

Features

  • Markdown and Modern IRC Client Features
  • Paste support for long messages
  • Channel Join/Quit broadcasts
  • Discord webhook support
  • Non-prefixed messages for other IRC bots to handle
  • IRC anti-ping zero width character in usernames
  • User, channel, role, and emote mentions
  • Sticker and emote support (as images or animated viewer)
  • Reply bridging with context

Getting Started

Please see the Getting Started page.

Downloads

  • Release versions can be found on GitHub releases.
  • The latest build from source can be found as a GitHub actions artifact.
    • Users authenticated with GitHub can access builds here.
    • Unauthenticated users can access the latest version here.

Example Config

# Dis4IRC Configuration File

# A list of bridges that Dis4IRC should start up
# Each bridge can bridge multiple channels between a single IRC and Discord Server
bridges {
    # A bridge is a single bridged connection operating in its own space away from all the other bridges
    # Most people will only need this one default bridge
    default {
        # Relay joins, quits, parts, and kicks
        announce-joins-and-quits=false
        # Relay extra verbose information you don't really need like topics and mode changes.
        announce-extras=false
        # Mappings are the channel <-> channel bridging configurations
        channel-mappings {
            "712345611123456811"="#bridgedChannel"
        }
        # Your discord API key you registered your bot with
        discord-api-key="NTjhWZj1MTq0L10gMDU0MSQ1.Zpj02g.4QiWlNw9W5xd150qXsC3e-oc156"
        # Match a channel id to a webhook URL to enable webhooks for that channel
        discord-webhooks {
            "712345611123456811"="https://discordapp.com/api/webhooks/712345611123456811/blahblahurl"
        }
        # Discord-specific configuration options
        discord-options {
            # Descriptor text to show in the client. An empty string will show nothing. This may not update immediately.
            activity-desc=IRC
            # Activity type to report to Discord clients. Acceptable values are DEFAULT, LISTENING, STREAMING, WATCHING, COMPETING
            activity-type=DEFAULT
            # Additional URL field used by certain activity types. Restricted to certain URLs depending on the activity type.
            activity-url=""
            # Online status indicator. Acceptable values are ONLINE, IDLE, DO_NOT_DISTURB, INVISIBLE
            online-status=ONLINE
        }
        commands {
            pinned {
                enabled="true"
            }
            stats {
                enabled="true"
            }
        }
        # Configuration for connecting to the IRC server
        irc {
            anti-ping=true
            nickname=TestBridge2
            # Messages that match this regular expression will be passed to IRC without a user prefix
            no-prefix-regex="^\\.[A-Za-z0-9]"
            # Sets the max context length to use for messages that are Discord replies. 0 to disable.
            discord-reply-context-limit=90
            # A list of __raw__ irc messages to send
            init-commands-list=[
                "PRIVMSG NICKSERV info",
                "PRIVMSG NICKSERV help"
            ]
            port="6697"
            realname=BridgeBot
            send-discord-embeds=true
            server="irc.esper.net"
            # Controls whether bridged nicknames will use color
            use-nickname-colors=true
            use-ssl=true
            username=BridgeBot
        }
        mutators {
            paste-service {
                max-message-length=450
                max-new-lines=4
                # Number of days before paste expires. Use 0 to never expire.
                paste-expiration-in-days=7
            }
        }
    }
}
debug-logging=true

Obligatory

xkcd #1782

The Name

The name is a typo of a typo of a bad idea of a misspoken phrase. Let's just not go there :p

Built using

dis4irc's People

Contributors

kashike avatar mbax avatar phoenix616 avatar robomwm avatar zachbr avatar zarthus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dis4irc's Issues

Messages from Dis -> IRC containing spaces removes the sender's Nickname

Example:
DIS: doublehelix457 hello
IRC: <BotName> <doublehelix457> hello

^ Works just as expected

DIS: doublehelix457 How are you?
IRC: <BotName> how are you?

^ Add spaces, and we have a problem

This is a problem because OUR IRC is linked with other chat services and relies on nicknames being present.

On a semi-related issue, it seems nicknames Dis -> IRC also contain zero width spaces, which shows up on other chat services.

DIS: doublehelix457 hello
IRC: <BotName> <doublehelix457> hello
Telegram and other: <d ou bl eh el ix 45 7> hello

I thought these issues might be related thus I grouped them together here. I have built from the latest commit on this repo.

Support pinging discord users with spaces in their names

Currently, the system for pinging discord users based on their name is based on splitting the words of a sentence up and querying JDA for users matching the word.

This method obviously does not support users with spaces in their names. A solution that does would be preferable but must still remain relatively performant at scale. For now, we can assume that scale to be a guild of around 1000 users.

Ability to read pins from IRC

It would be nice to have a command which sends you a notice with all the pins of the discord channel that is bridged.

Display discord username in IRC if nickname is set

This is a feature request to display the discord username if a nickname is set and differs from the discord username. (Ideally with the identifier, maybe after the nickname in brackets?) This avoids confusion when two users set the same discord nick or with some users that like to change their nicknames often.

[Question] How does Dis4IRC handle JDA's auto closing webhook feature?

Ive noticed that after a while a JDA WebHookClient will automatically close. If i were to run this application for a long period of time using the webhook feature, is it reliable? How is it handled? Some people use guava's cache as a workaround with a removal listener. Just need to know these things before I use the application on a production server.

IRC connection constantly being closed with null reason

Unfortunately I restarted it before moving the log output so I don't have that anymore, but it was disconnected from both spigot and esper.

[21:31:03] [esper] [WARN] - IRC connection closed: null reason
[21:31:03] [esper] [INFO] - Will attempt to reconnect
[21:31:06] [io.netty.handler.ssl.SslHandler] [DEBUG] - [id: 0x03115712, L:/redacted:53213 - R:irc.esper.net/45.79.137.210:6697] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
[21:31:44] [esper] [WARN] - IRC connection closed: null reason
[21:31:44] [esper] [INFO] - Will attempt to reconnect
[21:31:48] [io.netty.handler.ssl.SslHandler] [DEBUG] - [id: 0x944541c1, L:/redacted:48874 - R:irc.esper.net/139.99.136.176:6697] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
[21:32:26] [esper] [WARN] - IRC connection closed: null reason
[21:32:26] [esper] [INFO] - Will attempt to reconnect
[21:32:30] [io.netty.handler.ssl.SslHandler] [DEBUG] - [id: 0xcaed116e, L:/redacted:49585 - R:irc.esper.net/185.52.1.101:6697] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

Configurable colors

Would be nice to have a setting for either:

  • Colors used
  • A toggle for dark/black backgrounds

Or just change the hardcoded colors to be more "dark mode friendly," removing colors such as dark blue.

I'd be fine with the third option, as I'd like to see names in #paper and related too

CI server/GitHub actions

Would be cool if there was a public CI server available or GitHub actions which archive the jar file so that one could easily obtain latest builds. (Currently I have setup manual builds on my Jenkins but I doubt everyone wants to go through that effort just to test/use latest changes)

No reconnect to IRC

Dis4IRC was disconnected from irc.freenode.net, but did not try to reconnect.

The quit message in IRC said

has quit [Quit: Connection to server lost.]

In the console log there was a single message:

[07:49:40] [default] [WARN] - IRC connection closed: null reason

Unlike issue #31, there is just this one message. No Will attempt to reconnect message in a loop. At the time of the issue, the log level was set to info. So no debug information is available until the this happens again. But the "Will attempt to reconnect` is shown as INFO in the other issue report.

Parameter to have non colored irc names

I have a note bot that runs on the discord and irc server that I'm a part of. The names show up colored on irc side. With the colored names our notebot doesn't detect that people are trying to get their messages on the discord side. I was wondering if there was a mutate or something to turn the coloring off.

New Discord Names

Hello is there a way to have the bot recognize the username in the discord channel and not the general username used for discord for example if someone's user name for discord is myusername1234, and in a discord channel they use myname. Instead of using myusername123 it recognizes myname. This is just a wishlist thing.

Support threads

Discord is rolling out a new feature called "Threads". Simply forwarding new messages from them (maybe with some thread ID in the message?) should be enough imo.

I assume JDA needs to add support first though :S

javax.security.auth.login.LoginException

New to all of this, after editing the config and launching it via java -jar Dis4IRC-1.4.2.jar I receive the below error.

Any guidance?

Unable to initialize bridge connections: javax.security.auth.login.LoginException: The provided token is invalid!
javax.security.auth.login.LoginException: The provided token is invalid!
at net.dv8tion.jda.internal.JDAImpl.verifyToken(JDAImpl.java:381)
at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:301)
at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:268)
at net.dv8tion.jda.api.JDABuilder.build(JDABuilder.java:1874)
at io.zachbr.dis4irc.bridge.pier.discord.DiscordPier.start(DiscordPier.kt:54)
at io.zachbr.dis4irc.bridge.Bridge.startBridge(Bridge.kt:43)
at io.zachbr.dis4irc.Dis4IRC.startBridge(Dis4IRC.kt:135)
at io.zachbr.dis4irc.Dis4IRC.(Dis4IRC.kt:97)
at io.zachbr.dis4irc.Dis4IRCKt.main(Dis4IRC.kt:36)
Exception in thread "main" kotlin.UninitializedPropertyAccessException: lateinit property discordApi has not been initialized
at io.zachbr.dis4irc.bridge.pier.discord.DiscordPier.onShutdown(DiscordPier.kt:83)
at io.zachbr.dis4irc.bridge.Bridge.shutdown$Dis4IRC(Bridge.kt:91)
at io.zachbr.dis4irc.bridge.Bridge.startBridge(Bridge.kt:48)
at io.zachbr.dis4irc.Dis4IRC.startBridge(Dis4IRC.kt:135)
at io.zachbr.dis4irc.Dis4IRC.(Dis4IRC.kt:97)
at io.zachbr.dis4irc.Dis4IRCKt.main(Dis4IRC.kt:36)

Possible CF Filtering/unclear freeze

Hello,

I have set up Dis4IRC on a local W10 host for local testing, which was mostly successful.

Upon attempting to move it out of my home network and onto the same VPS that hosts my bouncer (Arch on DO), I was unable to stand it up with the following logs being what's at the end of the logging.

Nov 02 00:12:23 disconsented.com java[550405]: [00:12:23] [default] [INFO] - Connecting to Discord API...
Nov 02 00:12:23 disconsented.com java[550405]: [00:12:23] [net.dv8tion.jda.internal.requests.RateLimiter] [TRACE] - Bucket unlimited+GET/gateway:guild_id:channel_id:webhook_id is running 1 requests
Nov 02 00:12:23 disconsented.com java[550405]: [00:12:23] [net.dv8tion.jda.internal.requests.Requester] [TRACE] - Executing request GET https://discord.com/api/v6/gateway
Nov 02 00:12:23 disconsented.com java[550405]: [00:12:23] [net.dv8tion.jda.internal.requests.Requester] [TRACE] - Finished Request GET https://discord.com/api/v6/gateway with code 200
Nov 02 00:12:23 disconsented.com java[550405]: [00:12:23] [net.dv8tion.jda.internal.requests.Requester] [DEBUG] - Received response with following cf-rays: [6a7927eaf86870e0-SJC]

Which I believe aligns to https://github.com/zachbr/Dis4IRC/blob/master/src/main/kotlin/io/zachbr/dis4irc/bridge/pier/discord/DiscordPier.kt#L53-L55

I assume it's getting stuck on awaitReady() because Cloudflare is being a pain and filtering the address.

The JDA discord suggests updating JDA, since V6 is deprecated, which may be a contributing factor here.

Versioning doesn't load properly on certain Java versions(?)

On my Arch box with Java 8 192 (also appears to work fine on Java 11 11.0.1+13)

~/Desktop/test                                                                                                           
▶ java -jar BridgeBot2-new.jar 
[18:27:00] [init] [INFO] - Starting Dis4IRC v1.0-SNAPSHOT
[18:27:00] [init] [INFO] - Built on 2018-11-02 at 18:18 EDT
[18:27:00] [init] [INFO] - Source available at https://github.com/zachbr/Dis4IRC
[18:27:00] [init] [INFO] - Licensed under the GNU Affero General Public License v3
[18:27:00] [init] [INFO] - Loading config from: config.hocon
...
~/Desktop/test                                                                                                          ⍉
▶ java -version
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (build 1.8.0_192-b26)
OpenJDK 64-Bit Server VM (build 25.192-b26, mixed mode)

On the server with Java 8 181

zach@godzilla:~/bridgebot2$ java -jar BridgeBot2-new.jar 
[18:25:43] [init] [INFO] - Starting Dis4IRC vUnknown version
[18:25:43] [init] [INFO] - Built on Unknown build date
[18:25:43] [init] [INFO] - Source available at Unknown source repo
[18:25:43] [init] [INFO] - Licensed under the GNU Affero General Public License v3
[18:25:43] [init] [INFO] - Loading config from: config.hocon
...
zach@godzilla:~/bridgebot2$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.18.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

When user doesn't have an active Discord account, use a Github avatar as a fallback

I'm a big fan of user avatars and I get quite attached to them. This would make it somewhat nicer to talk with members of our community who choose to continue using IRC.
Most IRC users have the 'HideMail' flag enabled, so I'm thinking we try to lookup a github user that matches the IRC account. We could possibly restrict this to registered IRC users to avoid spamming the Github API.

Dicussed (on discord)[https://discordapp.com/channels/289587909051416579/555469074080202765/729044968773124147]

I'm just putting this here so I don't forget about this 😄

It was also mentioned that the existing functionality could (theoretically) be abused. For example, RoboMWM doesn't have an IRC account. It would be possible to create a discord user with his name with some avatar he doesn't like. Not really sure what a good solution to this would be since IRC usernames could probably be spoofed even more easily.

Bridge options for new Discord reply style

Now that discord has rolled out its new reply system, bridged messages lack the context they once had (as compared to the old quote system).

Additional functionality for adding back some of that context could be beneficial to IRC users.

  • [9:01 PM] z0w0: could do like (in response to <name>) in front of the message?
  • [9:01 PM] Z750: that or just fake the old quote system
  • [9:01 PM] EterNity: or just do > name

This is largely open-ended. Depending on what's available and what looks nice, we may do one of the above, something else entirely, or add a setting to control it.

Just a reminder ticket.

Strip color from IRC messages going to Discord

[10:09 AM] BOT Godzilla: [�13Paper�] �15aikar� pushed 1� new commit to �06master�: �02__https://git.io/fxxAs�__�
[10:09 AM] BOT Godzilla: �13Paper�/�06master� �146c27091� �15Aikar�: @Fix enttiy move merge issues - fixes #1637

[10:10 AM] Aikar: Z750 the bridge isnt stripping color codes. looks fugly

Multiple channel mappings using snowflakes throws NumberFormatException on config save

16:06:40.330 [main] ERROR init - Could not save configuration file!
java.io.IOException: java.lang.NumberFormatException: For input string: "508562150651068416"
	at ninja.leaping.configurate.loader.AbstractConfigurationLoader.save(AbstractConfigurationLoader.java:174)
	at io.zachbr.dis4irc.config.Configuration.saveConfig$Dis4IRC_main(Configuration.kt:63)
	at io.zachbr.dis4irc.Dis4IRC.<init>(Dis4IRC.kt:76)
	at io.zachbr.dis4irc.Dis4IRCKt.main(Dis4IRC.kt:24)
Caused by: java.lang.NumberFormatException: For input string: "508562150651068416"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:583)
	at java.lang.Integer.parseInt(Integer.java:615)
	at com.typesafe.config.impl.SimpleConfigObject$RenderComparator.compare(SimpleConfigObject.java:452)
	at com.typesafe.config.impl.SimpleConfigObject$RenderComparator.compare(SimpleConfigObject.java:422)
	at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
	at java.util.TimSort.sort(TimSort.java:220)
	at java.util.Arrays.sort(Arrays.java:1438)
	at com.typesafe.config.impl.SimpleConfigObject.render(SimpleConfigObject.java:483)
	at com.typesafe.config.impl.AbstractConfigValue.render(AbstractConfigValue.java:356)
	at com.typesafe.config.impl.SimpleConfigObject.render(SimpleConfigObject.java:510)
	at com.typesafe.config.impl.AbstractConfigValue.render(AbstractConfigValue.java:356)
	at com.typesafe.config.impl.SimpleConfigObject.render(SimpleConfigObject.java:510)
	at com.typesafe.config.impl.AbstractConfigValue.render(AbstractConfigValue.java:356)
	at com.typesafe.config.impl.SimpleConfigObject.render(SimpleConfigObject.java:510)
	at com.typesafe.config.impl.AbstractConfigValue.render(AbstractConfigValue.java:356)
	at com.typesafe.config.impl.AbstractConfigValue.render(AbstractConfigValue.java:372)
	at ninja.leaping.configurate.hocon.HoconConfigurationLoader.saveInternal(HoconConfigurationLoader.java:219)
	at ninja.leaping.configurate.loader.AbstractConfigurationLoader.save(AbstractConfigurationLoader.java:169)
	... 3 more

Caused by:
lightbend/config#604
lightbend/config#541

Parts of message are lost on IRC if split into multiple messages

When the message is too long to fit into a single IRC message and it has to split it into multiple it will loose parts of the message at the split location (looks like 13 chars in one case, not sure if that's all the time or maybe depending on the user name length)

The Road to 1.0 and making the repo public

  • Push latest to prod for testing (Dis4IRC v1.0-SNAPSHOT-7e7f58c)
  • Watch for a week or so for no new issues
  • Review source files looking for areas in need of clean up
  • Write some uber simple docs on how to set it up and use it.

Changing topics, joining invite only channels automatically and command recongition in IRC

Hey there,

This project is great because our game server uses many IRC bots that would never work on Discord.

Is it possible if someone changes the topic in IRC... for it to appear in Discord? Right now topic changes dont come through.

Is it also possible if someone types a command in discord... for an IRC bot to recognize it? For example in discord if I type "!time"... the IRC bot doesnt read it.

Lastly, how do i get the IRC bot side of things to auth against nickserv, and join rooms that are invite only automatically?

I've enabled web sockets, and this whole project looks very promising.

Add a system to re-send and handle messages that fail to send

Is there a way to have it log to a file? My screen got messed up when I was copying in putty somehow so I took screenshots before I had to end up zapping it with commands outside of it.

It did this for two consecutive messages, the last messages before that were sent (from IRC) a few minutes ago. If my screen didn't get screwed up I would've seen if it could resolve itself. But yea logging to a file would be good unless there's a way to pipe to file and console.

IRC users can have shorter names than are allowed on Discord

[15:07:36] [default] [DEBUG] - IRC MSG #paper Spottedleaf: let's test something else
[15:07:36] [default] [DEBUG] - Message from #paper Spottedleaf took 1ms to handle
[15:07:41] [default] [DEBUG] - IRC MSG #paper a: test
[15:07:41] [default] [DEBUG] - Message from #paper a took 1ms to handle
[15:07:41] [net.dv8tion.jda.webhook.WebhookClient] [DEBUG] - Failed to update buckets due to unsuccessful response with code: 400 and body:
{"username": ["Must be between 2 and 32 in length."]}
[15:07:41] [net.dv8tion.jda.webhook.WebhookClient] [ERROR] - Sending a webhook message failed with non-OK http response
net.dv8tion.jda.core.exceptions.HttpException: Request returned failure 400:
        at net.dv8tion.jda.webhook.WebhookClient.failure(WebhookClient.java:377) ~[Dis4IRC-1.0-SNAPSHOT.jar:?]
        at net.dv8tion.jda.webhook.WebhookClient.executePair(WebhookClient.java:441) ~[Dis4IRC-1.0-SNAPSHOT.jar:?]
        at net.dv8tion.jda.webhook.WebhookClient.drainQueue(WebhookClient.java:412) ~[Dis4IRC-1.0-SNAPSHOT.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_181]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
[15:07:49] [default] [DEBUG] - IRC MSG #paper Spottedleaf: ez
[15:07:49] [default] [DEBUG] - Message from #paper Spottedleaf took 1ms to handle

Remove zero-width spaces added by anti ping when trying to send to Discord/ping users

When trying to ping discord users from the IRC bridge the fastest (due to missing tab completion of bridged users) is usually to just copy the username from their messages. Due to them including zero-width spaces for the anti-ping functionality this will not produce a valid Discord ping tag.

To solve that issue and improve usability of the bridge I propose that the zero width spaces are either only strapped from message parts detected as user names/pings or just in general from the full message content (as I can't really think of a productive use case to still include them when forwarding anyways)

No prefix regex passes the prefix its supposed to ignore.

Not sure if it's an issue on my end, tried to look around to find a fix myself but couldn't
So for example, using the default regex you'd have
Discord:
Foo: Hey! Bar: .test
IRC:
Bridge | <Foo> Hey!
Bridge | .test
but what I'm looking for is to pass the message to IRC without the dot, is there any way I can do that?

Color usernames on the outgoing IRC side

[1:45 PM] Z750: yeah
[1:45 PM] Z750: rainbow is fine but it needs to maintain the same color per user
[1:46 PM] Z750: itd be nice if it could just be some function that takes a string and gives it a color based on its hashcode or somethin
[1:46 PM] Z750: rather than maintaining a map
[1:46 PM] Z750: but I havent looked into implementation of that concept
[1:47 PM] kashike: Z750 https://github.com/korobi/Web/blob/master/src/Korobi/WebBundle/IRC/Parser/NickColours.php
[1:47 PM] kashike: is what we do for Korobi logs

Multiple channel ?

Hello, we know how to make several discord irc channel links for different channels?

Redo configuration entirely to better organize features

The current configuration format has some organizational issues. To fix them as extensively as I'd like, there will need to be some breaking changes made to its format.

Because this is not an API, we will treat this as "breaking" and will need to make this a 2.0.0 level change. Migration may be possible and considered.

Generally the purpose of this change is to allow much more extensive customization of features and how they apply to all sides of the bridge.

Add ability to tag text channels

If someone writes #channelname in discord one will be able to click that to switch to that text channel.

If someone writes that via the IRC bridge that text is not clickable on Discord.

Bot does not reconnect if IRC connection dies for whatever reason

1.0.2 release.

[22:34:25] [default] [WARN] - IRC connection closed: null reason
[22:34:25] [default] [INFO] - Will attempt to reconnect
java.io.IOException: An existing connection was forcibly closed by the remote host
        at sun.nio.ch.SocketDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
        at sun.nio.ch.IOUtil.read(IOUtil.java:192)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
        at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1108)
        at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:345)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:126)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
[22:34:28] [io.netty.handler.ssl.SslHandler] [DEBUG] - [id: 0x83270abf, L:/10.0.2.4:53220 - R:irc.spi.gt/23.239.10.190:6697] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

The rest is your normal JDA stuff dropping. and resuming from time to time. Only this stuff was printed at this timeframe.

Configurable profile pictures on Discord

// try and get avatar for matching user
var avatarUrl: String? = null
val matchingUsers = guild.getMembersByEffectiveName(msg.sender.displayName, true)
if (matchingUsers.isNotEmpty()) {
avatarUrl = matchingUsers.first().user.avatarUrl
}
should be removed, and instead there should be a default profile picture used.

As a replacement, there should be user configured profile pictures for Discord. Something like using .discord set avatar https://i.cadixdev.org/avatar/jmansfield.png.

Make IRC Anti-Ping smarter

From Discord:

[6:40 PM] BillyGalbreath 🍗: be careful with tab limits in 1.13, each keypress in the client is now a tab complete attempt (thats how the new command suggestions work)
[6:40 PM] k9lego: YIKEs ok changing
[6:50 PM] k9lego: @BillyGalbreath 🍗 Thank you!!! :smile:

Became:

18:40 <+DiscordBot>  <​Bi​ll​yG​al​br​ea​th​ ?​?> be careful with tab limits in 1.13, each keypress in the client is now a tab complete attempt (thats how the new command suggestions work)
18:40 <+DiscordBot>  <​k9​le​go> YIKEs ok changing
18:50 <+DiscordBot>  <​k9​le​go> @BillyGalbreath 🍗 Thank you!!! 😄

Because:

[6:58 PM] kashike: @Z750 your antiping is breaking it
[6:58 PM] Z750: oh that'd do it
[6:59 PM] Z750: will have to make that smarter
[6:59 PM] Z750: "dont put ur shit in unicode chars thanks"
[6:59 PM] kashike: lol

Move to generic text formatting system

The current system for translating text formatting from discord and IRC involves a mutator in the middle of the system. This is not ideal because it can make it difficult for future systems to identify the formatting in use as depending on when it is accessed it may be in either Discord markdown or IRC escape codes.

This should also allow us to more intuitively handle sending multiple messages where the formatting needs to be split as well.

Such a system or library need only support basic text formats, (ex: bold, italics, underline, strikethrough) or the ability to add them.

Multiple Discord API connections opened when using multiple IRC connections with same bot

When having the bridge connect with multiple different IRC connections that use the same Discord bot endpoint it still tries to create a connection to the Discord API for both bridges instead of just once resulting in it being ratelimited on first connect:

[17:34:07] [phoenix616] [INFO] - Connecting to Discord API...
[17:34:08] [net.dv8tion.jda.api.JDA] [INFO] - Login Successful!
[17:34:08] [net.dv8tion.jda.internal.requests.WebSocketClient] [INFO] - Connected to WebSocket
[17:34:12] [net.dv8tion.jda.internal.requests.WebSocketClient] [ERROR] - Encountered IDENTIFY Rate Limit!
[17:34:12] [net.dv8tion.jda.internal.requests.WebSocketClient] [WARN] - Got disconnected from WebSocket (Code 1000). Appending to reconnect queue
[17:34:19] [net.dv8tion.jda.internal.requests.WebSocketClient] [INFO] - Connected to WebSocket
[17:34:19] [net.dv8tion.jda.api.JDA] [INFO] - Finished Loading!

Invalid webhook URL parsing

If the WebHook URL is less than 60 characters long the config initialization fails.

Line 100 of ConfigurationData.kt

Add support for Discord sticker forwarding

Discord added Stickers which are basically animated emojis in big. It would be nice if there was a way to forward them too at least similarly to how custom emojis are forwarded (but ideally including the sticker name too or something, that might be more fo a feature request to prepend sticker and emoji urls with the actual name so one doesn't have to open them)

Add setting for a username suffix/prefix in webhook mode

It would be nice to have the ability to pre- or append (IRC) to usernames in Discord when using the webhook to send "native-looking" messages so that it is clear where a "bot" user is chatting from and to avoid confusion.

Make changing the status of the bot optional

When starting the bot, it changes the status to "Playing IRC"
It would be nice to be able to disable that and/or change the status to a custom one

Adding a config option to toggle would be enough I think

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.