From aa778304d8c1a00817a018d03dc11fd131fc6206 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 18 May 2020 01:00:18 -0700 Subject: [PATCH] MessageHistory: add gecos to `aka` -sort --- PBot/MessageHistory.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PBot/MessageHistory.pm b/PBot/MessageHistory.pm index ed656f64..acd6d9dc 100644 --- a/PBot/MessageHistory.pm +++ b/PBot/MessageHistory.pm @@ -143,6 +143,14 @@ sub cmd_list_also_known_as { return lc $_[0]->{$b}->{hostmask} cmp lc $_[0]->{$a}->{hostmask}; } }, + + 'gecos' => sub { + if ($_[1] eq '+') { + return lc $_[0]->{$a}->{gecos} cmp lc $_[0]->{$b}->{gecos}; + } else { + return lc $_[0]->{$b}->{gecos} cmp lc $_[0]->{$a}->{gecos}; + } + }, ); my $sort_direction = '+';