Fix the IRC notification plugin.

This fixes the IRC notification plugin to wait for the connection to finish before sending the notification.

Additionally, it fixes a broken error check in the initalisation system.