add bounds checks on read_line and check for command being NUL
rework running condition - stop when nick quits
001 command contains the nick the server registered for us

we can ask for any nickname but the server will respond with
a 001 002 003 and 004 command with the nickname it registered
for us. this should be our nick's initial value regardless of
what the username is or was specified on the command line.

this also solves the issue of selecting a nickname that is
already in use. in such a case a NICK command will be echoed
by the server, so the nick will not be updated with the new
given value. setting the nick when we get a 001 command will
work this out.
use prefix as a nickname only if the command is PRIVMSG