2 static char rcsid[] = "$Header: talkto.c,v 1.7.0.1 85/03/18 20:56:55 notes Rel $";
6 * talkto(auth, uniq) struct auth_f *auth; struct id_d *uniq;
7 * see if the author is a local user (by checking the sys field of
8 * the note to see where it was written) and then grab his name from
9 * the auth structure. If he is not "Anonymous", and is local then
10 * we do a 'write name' command to talk with him.
12 * Ray Essick December 1981
17 static char *command = NULL;
22 char cmdline[CMDLEN]; /* build the command in here */
24 if (strcmp ("Anonymous", auth -> aname) == 0)
27 * with 4.2 and later -- we might want to let this go on past
28 * since the talk(1) program works across machine boundaries.
30 if (strcmp (Authsystem, auth -> asystem) != 0)
31 return; /* hard to talk to other machine */
32 if (command == NULL && (command = getenv ("WRITE")) == NULL)
33 command = WRITE; /* assign default */
34 sprintf (cmdline, "%s %s", command, auth -> aname);
35 printf ("%s\n", cmdline); /* let him know what doing */
38 dounix (cmdline, 1, 1); /* run the command */
40 dounix (1, 1, command, auth -> aname, 0, 0, 0);
43 printf ("--Hit any key to continue--");
44 gchar (); /* grab character and drop it */