go-irc / irc

A simple go irc library meant to be a building block for other projects
MIT License
142 stars 17 forks source link

reader: ignore empty messages #81

Closed hhirtz closed 3 years ago

hhirtz commented 3 years ago

The spec [0] says empty messages should be ignored instead of throwing an error.

[0] https://tools.ietf.org/html/rfc2812#section-2.3.1

hhirtz commented 3 years ago

build error looks unrelated

belak commented 3 years ago

Sorry about all the pushes, I just added tests and am making sure they pass before merging this in.

belak commented 3 years ago

Thanks for submitting this! I've been working on IRC packages for years and have somehow never run across this specific issue.

belak commented 3 years ago

I've also pushed v3.1.4 and v4.0.0-alpha.6 if you want to start using this today.

hhirtz commented 3 years ago

wow, thank you so much for merging this in and releasing a version so quickly!

for the record this has been raised from the irc-slack bridge, might be a bug on their side but it's still better to handle this case!

belak commented 3 years ago

I'm glad I was able to help! You just happened to catch me at a good time. :) If it ever takes more than a day or so to get a response, you can also ping me in the #ircdocs channel on Freenode.

qaisjp commented 3 years ago

from the irc-slack bridge

Out of curiosity which bridge is that?

Edit: ah nevermind, must be https://github.com/insomniacslk/irc-slack