mod_groups: Ignore whitespace on group member JID lines (thanks Luis!)

Mon, 22 Mar 2010 14:36:53 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 22 Mar 2010 14:36:53 +0000
changeset 2913
3d4e814cadfa
parent 2912
f5a5317f3485
child 2914
9f6fec37d3e2
child 2915
f47bd0f7e2e6

mod_groups: Ignore whitespace on group member JID lines (thanks Luis!)

plugins/mod_groups.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_groups.lua	Mon Mar 22 14:35:02 2010 +0000
+++ b/plugins/mod_groups.lua	Mon Mar 22 14:36:53 2010 +0000
@@ -98,7 +98,7 @@
 			groups[curr_group] = groups[curr_group] or {};
 		else
 			-- Add JID
-			local jid = jid_prep(line);
+			local jid = jid_prep(line:match("%S+"));
 			if jid then
 				module:log("debug", "New member of %s: %s", tostring(curr_group), tostring(jid));
 				groups[curr_group][jid] = true;

mercurial