Make client port configurable and move settings structure to be initialised in main() instead of dochat().