#HELP# /tell [<what>] - tell something, stopping input from joined channel(s)
#
# This is to avoid having the screen flooded by other talks while
# writing our own talk.
#
# Our typing will be announced so other users could be so kind to wait
# for you instead of typing as evils like they are used to
#
CMD_tell()
{
	if [ -z "$JOINPID" ]; then
		echo "Join a channel first"
		return
	fi

	kill -STOP $JOINPID

	if [ -n "$1" ]; then
		what="$@"
	else
		what="something"
	fi

	notify "$LOGNAME is going to tell you $what:"

	echo "Hit ^D when done" >&2
	cat > /tmp/shirc$$_$LOGNAME_tell
	{ while read REPLY; do CMD_say "$REPLY"; done } < /tmp/shirc$$_$LOGNAME_tell
	rm -f /tmp/shirc$$_$LOGNAME_tell
	
	kill -CONT $JOINPID
}

