Get the chat iinput...

I have a console of my own and i basically want to get what people type in chat into my own console, could anyone give me a pointer?

I’m doing this clientside.