3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-07 20:49:31 +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.";
} elsif (@accounts > 1) {
# 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;
foreach my $id (keys %users) {
push @hostmasks, "$users{$id} ($id)";
foreach my $account (@accounts) {
my $hostmask = $self->{pbot}->{messagehistory}->{database}->find_most_recent_hostmask($account);
push @hostmasks, "$hostmask ($account)";
}
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
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4389,
BUILD_REVISION => 4390,
BUILD_DATE => "2021-09-14",
};