Software /
code /
prosody
Diff
plugins/mod_admin_telnet.lua @ 9756:38f7bde4cfe0
mod_admin_telnet: Sort stats by name
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 04 Jan 2019 15:13:52 +0100 |
parent | 9755:fd4d516556aa |
child | 9786:00f7af0be849 |
line wrap: on
line diff
--- 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;