Software /
code /
prosody
Diff
plugins/mod_admin_telnet.lua @ 10505:142bdba5eea2
mod_admin_telnet: Sort by complete labels
Might as well.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 15 Dec 2019 20:44:10 +0100 |
parent | 10504:1f80e5ad3cea |
child | 10506:af214e2739f5 |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Sun Dec 15 20:43:02 2019 +0100 +++ b/plugins/mod_admin_telnet.lua Sun Dec 15 20:44:10 2019 +0100 @@ -965,7 +965,7 @@ end local function compare_hosts(a, b) - return a:gsub("%P+", string.reverse):reverse() < b:gsub("%P+", string.reverse):reverse(); + return a:gsub("[^.]+", string.reverse):reverse() < b:gsub("[^.]+", string.reverse):reverse(); end function def_env.host:list()