velour / chat

An easy-to-use client for Slack, Telegram, IRC, or all at once!
7 stars 0 forks source link

irc: figure out server-sent origin info once per client #56

Open eaburns opened 7 years ago

eaburns commented 7 years ago

We need to see what origin info the server sends for messages originated by our client in order to properly split messages. Currently, we do this once per Join, by blocking the Channel's send operations until we've received the JOIN message and can pull out it's header info. But the header info is constant for all Channels on a single client. It would be better to figure out this info once when the client Dials.

One option: Send a WHO for the client's own nick. That should have the info we want in the reply. The difficulty is that the response comes in a multi-message reply terminated with an RPL_ENDOFWHO message (or some such)—annoying.