diff -r 844ef764ef0e -r 8e02c10c9e60 plugins/mod_legacyauth.lua --- a/plugins/mod_legacyauth.lua Fri May 29 18:03:48 2009 +0100 +++ b/plugins/mod_legacyauth.lua Fri May 29 18:04:53 2009 +0100 @@ -19,7 +19,12 @@ module:add_feature("jabber:iq:auth"); module:add_event_hook("stream-features", function (session, features) - if not session.username then features:tag("auth", {xmlns='http://jabber.org/features/iq-auth'}):up(); end + if secure_auth_only and not session.secure then + -- Sorry, not offering to insecure streams! + return; + elseif not session.username then + features:tag("auth", {xmlns='http://jabber.org/features/iq-auth'}):up(); + end end); module:add_iq_handler("c2s_unauthed", "jabber:iq:auth",