mesg - permit or deny messages
mesg [ n ] [ y ]
Mesg with argument n forbids messages via write and talk(1) by revoking non-user write permission on the user's terminal. Mesg with argument y reinstates permission. All by itself, mesg reports the current state without changing it.
Exit status is 0 if messages are receivable, 1 if not, 2 on error.