Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 7091:1c3b38f80571
Merge 0.10->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 22 Jan 2016 13:22:50 +0000 |
parent | 7074:3ff83773ffc0 |
parent | 7090:7aa37d70944b |
child | 7359:a5a080c12c96 |
comparison
equal
deleted
inserted
replaced
7089:890f4b2cc444 | 7091:1c3b38f80571 |
---|---|
592 local function show_c2s(callback) | 592 local function show_c2s(callback) |
593 local c2s = array.collect(values(module:shared"/*/c2s/sessions")); | 593 local c2s = array.collect(values(module:shared"/*/c2s/sessions")); |
594 c2s:sort(function(a, b) | 594 c2s:sort(function(a, b) |
595 if a.host == b.host then | 595 if a.host == b.host then |
596 if a.username == b.username then | 596 if a.username == b.username then |
597 return a.resource or "" > b.resource or ""; | 597 return (a.resource or "") > (b.resource or ""); |
598 end | 598 end |
599 return a.username or "" > b.username or ""; | 599 return (a.username or "") > (b.username or ""); |
600 end | 600 end |
601 return a.host or "" > b.host or ""; | 601 return (a.host or "") > (b.host or ""); |
602 end):map(function (session) | 602 end):map(function (session) |
603 callback(get_jid(session), session) | 603 callback(get_jid(session), session) |
604 end); | 604 end); |
605 end | 605 end |
606 | 606 |