Comparison

plugins/mod_groups.lua @ 8991:37ebcc7c6768

mod_groups: Log a warning about invalid JIDs (#1180)
author Kim Alvefur <zash@zash.se>
date Sat, 07 Jul 2018 20:57:20 +0200
parent 7129:e4c886946ecb
child 8992:972b6f793ff9
comparison
equal deleted inserted replaced
8947:f12cc1d7aa65 8991:37ebcc7c6768
110 if jid then 110 if jid then
111 module:log("debug", "New member of %s: %s", tostring(curr_group), tostring(jid)); 111 module:log("debug", "New member of %s: %s", tostring(curr_group), tostring(jid));
112 groups[curr_group][jid] = name or false; 112 groups[curr_group][jid] = name or false;
113 members[jid] = members[jid] or {}; 113 members[jid] = members[jid] or {};
114 members[jid][#members[jid]+1] = curr_group; 114 members[jid][#members[jid]+1] = curr_group;
115 elseif entryjid:match("%S") then
116 module:log("warn", "Invalid JID: %q", entryjid);
115 end 117 end
116 end 118 end
117 end 119 end
118 module:log("info", "Groups loaded successfully"); 120 module:log("info", "Groups loaded successfully");
119 end 121 end