bitwalker/exirc — pull request #20 by jeffweiss (2014-11-24 08:34:37+00:00)
Title: create example client application. Close #13.

Prior to this commit, the README illustrated a simplified version of a
client; however, this simplified version did not actually join the
specified channel because logon takes a non-trivial amount of time and
the code, as illustrated in the README, will immediately attempt to join
a channel even though we're not fully logged on yet. This has taken
several people quite a while to figure out. This commit adds an example
application (along with a stripped down version on it in the README)
with 3 handlers: Connection, Login, and business logic.

The ConnectionHandler is responsible to initiating the connection to the
IRC server and then when we've received a message that we've connected,
initiating the logon process. The LoginHandler waits until we've
received the logged_in message and then attempts to join the channels.
Next the bot's OhaiHandler will greet people as they enter the channels
that itself had just joined.