plugins.xeps: Limit matches to 5

Mon, 08 Nov 2010 21:27:44 +0100

author
Kim Alvefur <zash@zash.se>
date
Mon, 08 Nov 2010 21:27:44 +0100
changeset 34
23e17e64ca25
parent 33
37caf7bd2021
child 35
0f17e574b6bb

plugins.xeps: Limit matches to 5

plugins/xeps.lua file | annotate | diff | comparison | revisions
--- a/plugins/xeps.lua	Thu Oct 14 13:21:55 2010 +0100
+++ b/plugins/xeps.lua	Mon Nov 08 21:27:44 2010 +0100
@@ -55,6 +55,7 @@
 						xepnum = string.rep("0", 4-x:len())..x;
 						local xep = xeps[tostring(x)];
 						ret = string.format("%s XEP-%s: %s%s", ret, xep.number, xep.name, ((_ < #results) and ",") or "");
+						if _ > 5 then ret = ret .. " " .. (#results - 5) .. " more"; break; end
 					end
 					return ret;
 				end

mercurial