Fix sending messages to protected irc channels

Also fixes a problem where the plugin wasnt exiting when it failed to have
any joinable channels due to a non kicked error.

Fixes #1030