irkerd: Handle missing usernames
Restore the default 'irker' username from the pre-asyncio code:
username=target.username or username or 'irker',
We don't have a username argument, so it's currently either
target.username or the default. This avoids a handshake with
ircs://:********@irc.example.net/chan that looks like:
client: PASS ********
client: NICK irker123
client: USER 0 * :irker relaying client
^ empty, string
server: :irc.example.net 461 irker123 USER :Syntax error
To make extra sure we don't have problems, we only submit PASS when we
have both a password and username [1], and only submit USER when we
have a username. There's no sense in trying to authenticate yourself
with PASS if you don't have a username, although with the new code
it's impossibe to not have a username.
[1]: http://tools.ietf.org/html/rfc2812#section-3.1