#	$eterna: finger,v 1.2 2001/08/12 15:57:11 mrg Exp $
#
# Finger script III by Daemon.
# 4-05-93
#  Four forms are available.
# finger nickname         will finger the user@host of the nickname
# finger -h nickname      will finger the @host of the nickname
# finger user@host.name   will finger the given user@host
# finger @host.name       will finger the given @host.name
# 4-10-93
# Updated script to deal with output from 2.8.3-> servers. (# stuff)
# updated for 2.2.2
# updated for 2.2.5   (this doesn't mean much.. )

alias finger {
	if (([$0] == [-h]) && ([$1] != []))
	{
		userhost $1 -cmd if ([$3] != [<UNKNOWN>])
				{ eval exec exec finger @$$4 }
				{ echo *** FINGER: no such nickname $1 }
	}
	{
	if (index(@ $0) > -1)
	{
		exec -name finger exec finger $0
	}
	{
	if ([$0])
	{
		userhost $0 -cmd if ([$3] != [<UNKNOWN>])
				{ eval exec -name finger exec finger $$strip(~#> $3)@$$4 }
				{ echo *** FINGER: no such nickname $0 }
	}
	{
		echo *** Usage: finger [[-h] <nickname>][[user]@full.hostname]
		echo *** e.g. finger bob, finger -h bob, finger robert@eff.org, or finger @eff.org
	}}}
}
