42wim / matterircd

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

Sanitize nicks, replace invalid chars with dash #374

Closed 42wim closed 3 years ago

dfskoll commented 3 years ago

Hi,

I'm running 0.22.1-dev and still see problems with nicks with spaces in them. I do have this commit (I built from master and HEAD is c738ee71d89d82c73d58f2767c0db276fb60c58f) and yet I saw this in my IRC client:

GARBAGE: Travis CI!Travis CI@Travis CI PRIVMSG #github :> Build ...

Because "Travis CI" has a space in it, the IRC client got very confused.

Regards,

Dianne.

dfskoll commented 3 years ago

Completely untested patch attached. I'll let you know if it works next time a nick with a space PRIVMSGs me. :)

nick-space-fix.txt

dfskoll commented 3 years ago

The patch worked. I will go through the code to see if any more spots have been missed and then try creating a pull request. (I have never programmed in Go before, but it seems pretty straightforward.)