mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-17 05:50:56 +01:00
MessageHistory: override sort method to seen if -l is specified without -sort
This commit is contained in:
parent
b3a5b57f71
commit
f293366ad0
@ -67,7 +67,7 @@ sub cmd_list_also_known_as {
|
|||||||
|
|
||||||
Getopt::Long::Configure("bundling_override");
|
Getopt::Long::Configure("bundling_override");
|
||||||
|
|
||||||
my $sort_method = 'nick';
|
my $sort_method = undef;
|
||||||
my ($show_hostmasks, $show_gecos, $show_nickserv, $show_id, $show_relationship, $show_weak, $show_last_seen, $dont_use_aliases_table);
|
my ($show_hostmasks, $show_gecos, $show_nickserv, $show_id, $show_relationship, $show_weak, $show_last_seen, $dont_use_aliases_table);
|
||||||
my @opt_args = $self->{pbot}->{interpreter}->split_line($context->{arguments}, strip_quotes => 1);
|
my @opt_args = $self->{pbot}->{interpreter}->split_line($context->{arguments}, strip_quotes => 1);
|
||||||
GetOptionsFromArray(
|
GetOptionsFromArray(
|
||||||
@ -87,6 +87,9 @@ sub cmd_list_also_known_as {
|
|||||||
return "Too many arguments -- $usage" if @opt_args > 1;
|
return "Too many arguments -- $usage" if @opt_args > 1;
|
||||||
return "Missing argument -- $usage" if @opt_args != 1;
|
return "Missing argument -- $usage" if @opt_args != 1;
|
||||||
|
|
||||||
|
$sort_method = 'seen' if $show_last_seen and not defined $sort_method;
|
||||||
|
$sort_method = 'nick' if not defined $sort_method;
|
||||||
|
|
||||||
my %sort = (
|
my %sort = (
|
||||||
'id' => sub {
|
'id' => sub {
|
||||||
if ($_[1] eq '+') {
|
if ($_[1] eq '+') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user