Diff

plugins/mod_admin_telnet.lua @ 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
parent 7070:aab022cb8e29
child 7091:1c3b38f80571
child 7471:3631d259bb85
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);