+ } elsif ($inprocess && /^ADDUSER\s(.*)$/) {
+ if (($priv & 2) != 2) {
+ print REPLY "You're not authorised to use the ",
+ "ADDUSER command.\n";
+ } elsif ($1 =~ /^([a-z0-9]+) ([A-Fa-f0-9]{8}) (\d+) (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/) {
+ addautodnsuser($1, $2, $3, $4);
+
+ print REPLY "Attempting to import new key:\n";
+
+ # Feed our command mail to GPG so we can pull the
+ # (hopefully included) new GPG key out from it.
+ my $pid = open3(\*GPGIN, \*GPGOUT, \*GPGERR,
+ "gpg --batch --import");
+
+ # Feed it the mail.
+ print GPGIN join("\n", @COMMANDS);
+ close GPGIN;
+
+ # And grab what it has to say.
+ @GPGERROR = <GPGERR>;
+ my @GPGOUTPUT = <GPGOUT>;
+ close GPGERR;
+ close GPGOUT;
+ waitpid $pid, 0;
+
+ print REPLY @GPGERROR;
+ } else {
+ print REPLY "ADDUSER parameter error.\n";
+ }