Object network now passed by reference instead of by pointer

Chat read and write message functions now takes the network object
argument by reference instead of by pointer.