From 082b982be48d477313fa825239a18802f3e201e1 Mon Sep 17 00:00:00 2001 From: AardCrowley Date: Wed, 22 Feb 2023 22:34:29 -0500 Subject: [PATCH] Cosmetic; and added '-r' argument to reverse offline list --- FriendAgoSorted/FriendAgoSorted.xml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/FriendAgoSorted/FriendAgoSorted.xml b/FriendAgoSorted/FriendAgoSorted.xml index 8239637..f9b1333 100644 --- a/FriendAgoSorted/FriendAgoSorted.xml +++ b/FriendAgoSorted/FriendAgoSorted.xml @@ -4,6 +4,7 @@ + @@ -28,9 +29,12 @@ - + resetValues() + if "%1" == "-r" then + reverse = true + end EnableTriggerGroup("friendCheck") Send("friend ago") @@ -44,14 +48,15 @@ b.value end) + + if reverse == true then + table.sort(sortedTable, function(b, a) return a.value > b.value end) + else + table.sort(sortedTable, function(a, b) return a.value > b.value end) + end + reverse = false return sortedTable end