# HG changeset patch # User Matthew Wild # Date 1347558565 -3600 # Node ID cbcd173ad906436c77bfa2e3207489b6e254598c # Parent cdbc86b69ea21ea8f67245593d65d6f45fb42a7b# Parent a0673b644f05bae7a022dbe6b3e9cf07055cf2d5 Merge 0.9->trunk diff -r cdbc86b69ea2 -r cbcd173ad906 plugins/mod_legacyauth.lua --- a/plugins/mod_legacyauth.lua Thu Sep 13 18:32:24 2012 +0100 +++ b/plugins/mod_legacyauth.lua Thu Sep 13 18:49:25 2012 +0100 @@ -35,7 +35,7 @@ local session, stanza = event.origin, event.stanza; if session.type ~= "c2s_unauthed" then - session.send(st.error_reply(stanza, "cancel", "service-unavailable", "Legacy authentication is only allowed for unauthenticated client connections.")); + (session.sends2s or session.send)(st.error_reply(stanza, "cancel", "service-unavailable", "Legacy authentication is only allowed for unauthenticated client connections.")); return true; end