Skip to content

Instantly share code, notes, and snippets.

@datenschrott
Created May 6, 2015 15:16
Show Gist options
  • Save datenschrott/ee7bd404fb29926d3a7f to your computer and use it in GitHub Desktop.
Save datenschrott/ee7bd404fb29926d3a7f to your computer and use it in GitHub Desktop.
datenschrott
# get_signature()
# Returns the users signature, if any
sub get_signature
{
local $sf = &get_signature_file();
$sf || return undef;
local $sig;
open(SIG, $sf) || return undef;
while(<SIG>) {
$sig .= $_;
}
close(SIG);
return $sig;
}
# get_signature_file()
# Returns the full path to the file that should contain the user's signature,
# or undef if none is defined
sub get_signature_file
{
return undef if ($userconfig{'sig_file'} eq '*');
local $sf = $userconfig{'sig_file'};
$sf = "$remote_user_info[7]/$sf" if ($sf !~ /^\//);
return &group_subs($sf);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment