File: finger

package info (click to toggle)
epic 3.004-17.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,192 kB
  • ctags: 3,197
  • sloc: ansic: 40,843; makefile: 530; sh: 129; perl: 17
file content (42 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Finger script III by Daemon.  (4/05/93)
# Updated			(4/10/93)
#	Updated for ircd2.8.3, ircII2.2.2
# Updated			(3/07/96)
#	Updated for EPIC3


/*
 * 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
 */

alias finger 
{
	switch ($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
		}
		(-h)
		{
			userhost $1 -cmd if ([$3] != [<UNKNOWN>])
					{ eval exec exec finger @$$4 }
					{ echo *** FINGER: no such nickname $1 }
		}
		(*@*)
		{
			exec -name finger exec finger $0
		}
		(*)
		{
			userhost $0 -cmd if ([$3] != [<UNKNOWN>])
					{ eval exec -name finger exec finger $$strip(~#> $3)@$$4 }
					{ echo *** FINGER: no such nickname $0 }
		}
	}
}