Changeset

10510:fe0884ddb4f8

mod_admin_telnet: Use common sort function in s2s:show
author Kim Alvefur <zash@zash.se>
date Sun, 15 Dec 2019 22:15:52 +0100
parents 10509:0aa0fd1adbb0
children 10511:f89dbf7d03b8
files plugins/mod_admin_telnet.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Sun Dec 15 21:44:58 2019 +0100
+++ b/plugins/mod_admin_telnet.lua	Sun Dec 15 22:15:52 2019 +0100
@@ -781,8 +781,8 @@
 
 	-- Sort by local host, then remote host
 	table.sort(s2s_list, function(a,b)
-		if a.l == b.l then return a.r < b.r; end
-		return a.l < b.l;
+		if a.l == b.l then return _sort_hosts(a.r, b.r); end
+		return _sort_hosts(a.l, b.l);
 	end);
 	local lasthost;
 	for _, sess_lines in ipairs(s2s_list) do