qaisjp / go-discord-irc

The Discord and IRC bridge with puppets! An IRC user is created for each Discord user, messages from IRC seamlessly appear on Discord, and Discord mentions are automagically converted to and from IRC.
MIT License
113 stars 32 forks source link

max_nick_length is broken #122

Open DarkRTA opened 3 years ago

DarkRTA commented 3 years ago

Hi, I attempted to use this to bridge to an IRC network with a rediculously low nicklen (9 characters), and I ended up having to modify the code as this option does not behave how I expect it to.

A good change would be to have it behave similarly to this:

if we assume the following is true:
nicklen: 9
suffix: |d
Discord Username: IHaveALongName#0001

then we should end up with something like this:

irc nick: IHaveAL|d
irc fallback nick: IH_0001|d

This looks incredibly ugly but with such a short nicklen you can't get any better. This is still way better than the option being broken and the bridge trying to use longer nicknames than what is permitted on the server.