42wim / matterircd

Connect to your mattermost or slack using your IRC-client of choice.
MIT License
295 stars 60 forks source link

Add option to use Nickname instead of Username #273

Closed guilhermepiccoli closed 4 years ago

guilhermepiccoli commented 4 years ago

Currently matterircd uses Username as the nick handler for every user, regardless if such user have a Nickname set. There is an inherent restriction on using the Nickname - they may contain non-ascii chars, breaking compatibility with IRC clients.

This patch adds the config option PreferNickname - if set, we check Nickname and if it's not empty and doesn't contain any non-ascii character, matterircd uses the Nickname instead of Username. It's a Mattermost-only option for the time being.

Signed-off-by: Guilherme G. Piccoli gpiccoli@canonical.com

V2 just uploaded (2020-06-23): instead of checking just for ASCII chars, stick with IRC RFC and limit the nicknames according to this specification (and to max of 27 chars).

42wim commented 4 years ago

Thank you!

guilhermepiccoli commented 4 years ago

Thanks @42wim , for merging this one! Unfortunately there was an issue, and I fixed that some weeks ago...but didn't update the PR =/ My bad, sorry heheh

So, now we have a fix in PR #289 . Cheers!