Attempts to detect server and identify

Client attempts to figure out what IRCd the server is running, and
then
identifies accordingly.
Removed var from a lot of lines.
Changed some identation.
Made the
client join channels when it recievs the end of motd, rather
than
attempting to join after 10 seconds.
Tried to fix an autoscroll problem.