Modified write fnctn, added auto join, and added vars

Modified write function to auto add \r\n to message. Added the join part.
Turned some information into vars- connecting server, port number, server
name that talks to you.

I might consider making another read function that runs once for the
one-time checks like Join and server name.