Software /
code /
prosody
Diff
plugins/mod_admin_telnet.lua @ 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 |
parent | 10509:0aa0fd1adbb0 |
child | 10517:6e1163fa2cd2 |
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