diff 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
parents 9700c89f7bf6
children b0971d8815bf
line wrap: on
line diff
--- a/mod_manifesto/mod_manifesto.lua	Tue Feb 04 12:48:33 2014 +0100
+++ b/mod_manifesto/mod_manifesto.lua	Thu Feb 06 19:27:13 2014 +0100
@@ -55,6 +55,7 @@
 	end
 
 	timer.add_task(15, function ()
+		if session.type ~= "c2s" then return end -- user quit already
 		local bad_contacts, bad_hosts = {}, {};
 		for contact_jid, item in pairs(session.roster or {}) do
 			local _, contact_host = jid_split(contact_jid);