Ignore:
Timestamp:
Sep 28, 2009, 3:19:50 PM (15 years ago)
Author:
Karl Ramm <kcr@1ts.org>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
39cff48
Parents:
bb79a52
git-author:
Karl Ramm <kcr@1ts.org> (09/26/09 12:25:28)
git-committer:
Karl Ramm <kcr@1ts.org> (09/28/09 15:19:50)
Message:
Perl callout for zsig computation + move default to perl

Barnowl::default_zephyr_signature works out what your zsig
should be.

New owl variable zsigfunc, which contains a perl expression
that is evaluated for the zsig.  Defaults to the above.

This is much more pleasant code in perl than in C.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl.pm

    r7589f0a rde3f641  
    427427}
    428428
     429=head3 default_zephyr_signature
     430
     431Compute the default zephyr signature.
     432
     433=cut
     434
     435sub default_zephyr_signature
     436{
     437  if (my $zsig = getvar('zsig')) {
     438    return $zsig;
     439  }
     440  if (my $zsigproc = getvar('zsigproc')) {
     441    return `$zsigproc`;
     442  }
     443  my $zwrite_signature = get_zephyr_variable('zwrite-signature');
     444  if (defined($zwrite_signature)) {
     445    return $zwrite_signature;
     446  }
     447  my $name = ((getpwuid($<))[6]);
     448  $name =~ s/,.*//;
     449  return $name;
     450}
     451
    429452# Stub for owl::startup / BarnOwl::startup, so it isn't bound to the
    430453# startup command. This may be redefined in a user's configfile.
Note: See TracChangeset for help on using the changeset viewer.