Comparison

mod_manifesto/mod_manifesto.lua @ 1300:99748c89edd4

mod_manifesto: Fix traceback when user disconnects before the timer (fixes #48)
author Kim Alvefur <zash@zash.se>
date Thu, 06 Feb 2014 19:27:13 +0100
parent 1286:9700c89f7bf6
child 1305:b0971d8815bf
comparison
equal deleted inserted replaced
1299:a7d6c6d2c7b5 1300:99748c89edd4
53 if last_notify > ( now - 86400 * 7 ) then 53 if last_notify > ( now - 86400 * 7 ) then
54 return 54 return
55 end 55 end
56 56
57 timer.add_task(15, function () 57 timer.add_task(15, function ()
58 if session.type ~= "c2s" then return end -- user quit already
58 local bad_contacts, bad_hosts = {}, {}; 59 local bad_contacts, bad_hosts = {}, {};
59 for contact_jid, item in pairs(session.roster or {}) do 60 for contact_jid, item in pairs(session.roster or {}) do
60 local _, contact_host = jid_split(contact_jid); 61 local _, contact_host = jid_split(contact_jid);
61 local bad = false; 62 local bad = false;
62 local remote_host_session = host_session.s2sout[contact_host]; 63 local remote_host_session = host_session.s2sout[contact_host];