aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-15 20:43:02 +0100
committerKim Alvefur <zash@zash.se>2019-12-15 20:43:02 +0100
commit821603db8aaadd6a068a619feb3ac5e7c2c6e099 (patch)
tree0f8de1eec47a1475c1cc762486531d0d286d0669
parentee3a103480d2af2dabf83174cd64e6917df5972d (diff)
downloadprosody-821603db8aaadd6a068a619feb3ac5e7c2c6e099.tar.gz
prosody-821603db8aaadd6a068a619feb3ac5e7c2c6e099.zip
mod_admin_telnet: Fix host sorting
Reversing each %P is a noop
-rw-r--r--plugins/mod_admin_telnet.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 60f92cda..940c3533 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -965,7 +965,7 @@ function def_env.host:deactivate(hostname, reason)
end
local function compare_hosts(a, b)
- return a:gsub("%P", string.reverse):reverse() < b:gsub("%P", string.reverse):reverse();
+ return a:gsub("%P+", string.reverse):reverse() < b:gsub("%P+", string.reverse):reverse();
end
function def_env.host:list()