Comparison

plugins/mod_blocklist.lua @ 6350:bba5f4ffe75a

mod_blocklist: Fix any unblock emptying the blocklist
author Kim Alvefur <zash@zash.se>
date Tue, 12 Aug 2014 15:38:48 +0200
parent 6344:68b5c1ed18dd
child 6351:10dc228a45a4
comparison
equal deleted inserted replaced
6346:ba7c86406d31 6350:bba5f4ffe75a
125 125
126 local blocklist = get_blocklist(username); 126 local blocklist = get_blocklist(username);
127 127
128 local new_blocklist = {}; 128 local new_blocklist = {};
129 129
130 if mode and next(new) then 130 if mode or next(new) then
131 for jid in pairs(blocklist) do 131 for jid in pairs(blocklist) do
132 new_blocklist[jid] = true; 132 new_blocklist[jid] = true;
133 end 133 end
134 for jid in pairs(new) do 134 for jid in pairs(new) do
135 new_blocklist[jid] = mode; 135 new_blocklist[jid] = mode;