KittehOrg / KittehIRCClientLib

An IRC client library in Java
https://kitteh.dev/kicl/
MIT License
146 stars 35 forks source link

incompatible with irc.twitch.tv:6667 #152

Closed jjYBdx4IL closed 8 years ago

jjYBdx4IL commented 8 years ago

The library complains about a missing server version during greeting or so.

mbax commented 8 years ago

Does it actually prevent you from doing things, though? I was pretty sure that didn't block anything.

jjYBdx4IL commented 8 years ago

well, it crashes XD

mbax commented 8 years ago

It actually fully crashes? Are you sure? I'd like to see a log with the inputs and outputs as well, to confirm it's actually failing and not continuing on after dropping off the exception.

builder.listenInput(in -> System.out.println("[I] "+in)).listenOutput(out -> System.out.println("[O] "+out);

I'm only asking so much because I recently tested on twitch.

jjYBdx4IL commented 8 years ago

oh yes, you are correct. still, can we get rid of the exception? :)

mbax commented 8 years ago

Though I'm open to a discussion on this, my opinion is that it is a valid exception. The IRC server is sending an invalid message, so KICL is just responding to receiving unexpected (lack of ) information.

Really though. Open to discussion.

AKPWebDesign commented 8 years ago

I'm in favor of having KICL throw the error, because having that in the case that the server is actually making a mistake (or something similar) is helpful. Perhaps a method of disabling certain errors/warnings would be nice though?

mbax commented 8 years ago

@AKPWebDesign the exception KittehServerMessageException is used just for situations where the server has done something that KICL considers... problematic. So,for your approach, you could just ignore those.

AKPWebDesign commented 8 years ago

Seems easy enough to me.

Zarthus commented 8 years ago

Would a separate exception be useful for this? I haven't investigated the issue, but if we expect the exception but there are also other causes that could trigger it you don't want to ignore, maybe separating them is wanted.

Really depends on how you'd pick up on it. It may just not be possible. (Knowing twitch, KICL's exceptions are probably all over the place.)

jjYBdx4IL commented 8 years ago

no idea, I have implemented my own down-stripped, minimal twitch irc client now because of that. Maybe you need some "compat mode" for Kitteh, that just expects the absolute minimum for operation.

mbax commented 8 years ago

@jjYBdx4IL I'm confused. Are you saying you wrote an entire minimal IRC client just because KICL complained about invalid input, even though it continued to work fine?

jjYBdx4IL commented 8 years ago

not "entire", just a socket reader that feeds events to listeners.

https://github.com/jjYBdx4IL/streaming-clients/tree/master/src/main/java/com/github/jjYBdx4IL/streaming/clients/twitch