File: finger.pl

package info (click to toggle)
sirc 2.211-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 372 kB
  • ctags: 356
  • sloc: perl: 4,254; ansic: 1,201; sh: 571; makefile: 67
file content (34 lines) | stat: -rw-r--r-- 856 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
# finger.pl --- A script for orabidoo's sirc
# 18 April 1995 by GG <choude@eece.maine.edu>
# modified and debugged by orabidoo <roger.espel.llima@ens.fr>

# Adds the capability to finger a user@host from either the nick or the
# actual user@host.  Uses the unix finger command to accomplish this

# 3 Nov 95: fixed a bug reported by Haaino Zuithoff (missing \)

$add_ons .= "+finger.pl";

sub GGfinger {
  if (fork) {
    foreach (`finger $_[0]`) {
      &tell($_);
      }
    exit 0;
    }
  }

sub cmd_finger {
  &tell("*\c_Finger Error\c_* usage /finger <nick> or /finger <user>\@<host>"), return unless $args;
  if ($args =~ /\@/) {
    &GGfinger($args);
    }
  else {
    &userhost($args, "&tell(\"*\c_Finger Reply\c_* \$who!\$user\\\@\$host\");
    		      \$user =~ s/^~//;
		      &GGfinger(\$user.'\@'.\$host);");
    }
  }

&addcmd("finger");