#!	/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.
#
#
#	talk to a user
#
echo -n  'Enter login or login@system: '
set x = $<
set y = ( $x )
set port = " "
if( $#y == 0 ) then
	exit
else if( $#y == 1 ) then
	set user = $y[1]
else if( $#y == 2 && $y[1] == "talk" ) then
	set user = $y[2]
else if( $#y == 2 ) then
	set user = $y[1]
	set port = $y[2]
else if( $#y == 3 && $y[1] == "talk" ) then
	set user = $y[2]
	set port = $y[3]
else
	echo '*** Invalid address'
	exit
endif

talk $user $port
#	sleep 'cause otherwise can't see error messages otherwise
sleep 1
