# HG changeset patch # User Kim Alvefur # Date 1289248064 -3600 # Node ID 23e17e64ca2573cf52045b096d991892013d3809 # Parent 37caf7bd2021120027211305840d14758a4ee225 plugins.xeps: Limit matches to 5 diff -r 37caf7bd2021 -r 23e17e64ca25 plugins/xeps.lua --- 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