Search code examples
javasocketschatprotocolsirc

Sending chat in custom IRC client


I'm programming a custom IRC client in java, and I have the recieving messages in chat fine, but what I can't figure out is how to send chat messages. I looked at IRCHelp.org but I didn't really understand the section about "Message format in ‘pseudo’ BNF, " which I believe is the section I might be looking for.

  1. Is this the section I'm looking for?

  2. If not, what section should I look at?


Solution

  • I think your best option might be to use an IRC library. The IRC protocol is fairly simple but large at the same time, to write a complete library would actually be a fair bit of work. On the other hand it's easy to write it yourself since IRC is a text based protocol.

    Why don't you take a look at one of these:

    • JerkLib - Uses NIO and is event driven
    • Sorcix' sIRC - Very compact library, uses listeners
    • PircBot - Rather for writing irc bots
    • IRClib - Neatly organised compact irc library that has support for SSL

    If you're certain you want to write the implementation yourself you can have a look at this.