Diff

client.lua @ 81:0924a3d05e40

Bounce service-unavailable on unhandled iq stanzas (thanks Kev, Florob and anyone else who poked me)
author Matthew Wild <mwild1@gmail.com>
date Mon, 21 Jun 2010 17:33:51 +0100
parent 78:f4188eff53a7
child 83:8221f3c25fd4
line wrap: on
line diff
--- a/client.lua	Mon Jun 14 14:12:44 2010 +0100
+++ b/client.lua	Mon Jun 21 17:33:51 2010 +0100
@@ -90,6 +90,10 @@
 						ret = self:event("iq", stanza);
 					end
 				end
+				if ret == nil then
+					self:send(verse.error_reply(stanza, "cancel", "service-unavailable"));
+					return true;
+				end
 			else
 				ret = self:event(stanza.name, stanza);
 			end