X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/4988a192dab00d86203bd44995b53284abfa1474..844ccbc0e22f5a4829c875e3cc0daa898d22a54f:/debian/extra/lib/debian-ldap-query diff --git a/debian/extra/lib/debian-ldap-query b/debian/extra/lib/debian-ldap-query old mode 100644 new mode 100755 index c30c940..f4e3ae4 --- a/debian/extra/lib/debian-ldap-query +++ b/debian/extra/lib/debian-ldap-query @@ -5,7 +5,7 @@ use strict; -my @attrs = qw(sn cn ircnick uid); +my @attrs = qw(sn mn cn ircnick uid); my $base = 'ou=users, dc=debian, dc=org'; my $server = 'db.debian.org'; my $port = 389; @@ -32,10 +32,12 @@ foreach my $search (@ARGV) { ) or die 'Failed search'; foreach my $entry ($mesg->entries) { my $uid = $entry->get_value('uid') || next; - my $fname = $entry->get_value('cn') || ''; - my $lname = $entry->get_value('sn') || ''; + my $fname = $entry->get_value('cn') || ''; + my $mname = $entry->get_value('mn') || ''; + $mname .= ' ' if $mname; + my $lname = $entry->get_value('sn') || ''; my $nick = $entry->get_value('ircnick')|| ''; - push @results, "<$uid\@debian.org>\t$fname $lname\t($nick)\n"; + push @results, "<$uid\@debian.org>\t$fname $mname$lname\t($nick)\n"; } }