Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 10509:0aa0fd1adbb0
mod_admin_telnet: Use existing host comparison when comparing JIDs
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 15 Dec 2019 21:44:58 +0100 |
parent | 10508:edd323b30de1 |
child | 10510:fe0884ddb4f8 |
comparison
equal
deleted
inserted
replaced
10508:edd323b30de1 | 10509:0aa0fd1adbb0 |
---|---|
628 if a.username == b.username then | 628 if a.username == b.username then |
629 return (a.resource or "") > (b.resource or ""); | 629 return (a.resource or "") > (b.resource or ""); |
630 end | 630 end |
631 return (a.username or "") > (b.username or ""); | 631 return (a.username or "") > (b.username or ""); |
632 end | 632 end |
633 return (a.host or "") > (b.host or ""); | 633 return _sort_hosts(a.host or "", b.host or ""); |
634 end):map(function (session) | 634 end):map(function (session) |
635 callback(get_jid(session), session) | 635 callback(get_jid(session), session) |
636 end); | 636 end); |
637 end | 637 end |
638 | 638 |