X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/0cc75c0c0bda96bdb506179fb4dd16f0232c13a5..c109233f5a6f34927cd93a271e5189b267373128:/debian/extra/lib/debian-ldap-query diff --git a/debian/extra/lib/debian-ldap-query b/debian/extra/lib/debian-ldap-query index c30c940..f4e3ae4 100755 --- 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"; } }