Changeset

7090:7aa37d70944b

mod_admin_telnet: Fix sorting of JIDs in c2s:show() family of functions (thanks lookshe and Zash)
author Matthew Wild <mwild1@gmail.com>
date Fri, 22 Jan 2016 13:20:00 +0000
parents 7087:dd8265ca9327
children 7091:1c3b38f80571 7098:5286e79c6829
files plugins/mod_admin_telnet.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Tue Jan 19 21:31:02 2016 +0100
+++ b/plugins/mod_admin_telnet.lua	Fri Jan 22 13:20:00 2016 +0000
@@ -557,11 +557,11 @@
 	c2s:sort(function(a, b)
 		if a.host == b.host then
 			if a.username == b.username then
-				return a.resource or "" > b.resource or "";
+				return (a.resource or "") > (b.resource or "");
 			end
-			return a.username or "" > b.username or "";
+			return (a.username or "") > (b.username or "");
 		end
-		return a.host or "" > b.host or "";
+		return (a.host or "") > (b.host or "");
 	end):map(function (session)
 		callback(get_jid(session), session)
 	end);