accept message from standard input, showing a message if coming from a tty