Add events API, and IRC support.