3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-25 13:29:29 +01:00

Users: simplify previous commit

This commit is contained in:
Pragmatic Software 2021-09-14 16:15:00 -07:00
parent fa65bfc878
commit 3d1479aa59
2 changed files with 4 additions and 11 deletions

View File

@ -393,18 +393,11 @@ sub cmd_id {
return "I don't know anybody matching hostmask $target."; return "I don't know anybody matching hostmask $target.";
} elsif (@accounts > 1) { } elsif (@accounts > 1) {
# found more than one account, list them # found more than one account, list them
my %users;
foreach my $account (@accounts) {
next if exists $users{$account};
my $hostmask = $self->{pbot}->{messagehistory}->{database}->find_most_recent_hostmask($account);
$users{$account} = $hostmask;
}
my @hostmasks; my @hostmasks;
foreach my $id (keys %users) { foreach my $account (@accounts) {
push @hostmasks, "$users{$id} ($id)"; my $hostmask = $self->{pbot}->{messagehistory}->{database}->find_most_recent_hostmask($account);
push @hostmasks, "$hostmask ($account)";
} }
return "Found multiple accounts: " . (join ', ', sort @hostmasks); return "Found multiple accounts: " . (join ', ', sort @hostmasks);

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script # These are set by the /misc/update_version script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 4389, BUILD_REVISION => 4390,
BUILD_DATE => "2021-09-14", BUILD_DATE => "2021-09-14",
}; };