#!	/bin/csh -f
#
# Copyright 1993, 1994, 1995 by the Regents of the University of California.
# see the file "Copyright" in the distribution for conditions of use.
#
#
#	try to figure out message status
#
cat << "EOT"

Status in the current login session:

	"y" means receiving talk requests is enabled
	"n" means receiving talk requests is not enabled

"EOT"
echo -n '        status '
mesg
#
echo ' '
echo -n "In future login sessions, receiving talk requests will be "
#	check last "mesg" command
awk 'BEGIN{ s = "en" } { if( NF == 2 && $1 == "mesg" ) { if ( $2 == "y" ) { s = "en"; } else if( $2 == "n" ) { s = "dis" } } } END { print s "abled." }' < ~/.login
echo " "
