# HG changeset patch # User Kim Alvefur # Date 1546611232 -3600 # Node ID 38f7bde4cfe07cac60b03950ca8694846add6564 # Parent fd4d516556aa2d93fef4b1fc06b74900207764a1 mod_admin_telnet: Sort stats by name diff -r fd4d516556aa -r 38f7bde4cfe0 plugins/mod_admin_telnet.lua --- a/plugins/mod_admin_telnet.lua Fri Jan 04 13:41:39 2019 +0100 +++ b/plugins/mod_admin_telnet.lua Fri Jan 04 15:13:52 2019 +0100 @@ -1543,7 +1543,7 @@ local stats, changed, extra = require "core.statsmanager".get_stats(); local available, displayed = 0, 0; local displayed_stats = new_stats_context(self); - for name, value in pairs(stats) do + for name, value in iterators.sorted_pairs(stats) do available = available + 1; if not filter or name:match(filter) then displayed = displayed + 1;