diff options
author | Kim Alvefur <zash@zash.se> | 2017-02-15 22:59:19 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-02-15 22:59:19 +0100 |
commit | 39639a7c38e9c7fe02e4bbfb649f2664eda06dd9 (patch) | |
tree | ec089ede9e558db9ed284aa0728242ef90f4050b /plugins | |
parent | fc7dadb6a71c4294edfd8e0844f929f757927a5e (diff) | |
download | prosody-39639a7c38e9c7fe02e4bbfb649f2664eda06dd9.tar.gz prosody-39639a7c38e9c7fe02e4bbfb649f2664eda06dd9.zip |
mod_saslauth: Cache logger in local for less typing
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 9917c303..f7803bc9 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -223,6 +223,7 @@ local bind_attr = { xmlns='urn:ietf:params:xml:ns:xmpp-bind' }; local xmpp_session_attr = { xmlns='urn:ietf:params:xml:ns:xmpp-session' }; module:hook("stream-features", function(event) local origin, features = event.origin, event.features; + local log = origin.log or log; if not origin.username then if secure_auth_only and not origin.secure then return; @@ -251,7 +252,7 @@ module:hook("stream-features", function(event) if mechanisms[1] then features:add_child(mechanisms); else - (origin.log or log)("warn", "No SASL mechanisms to offer"); + log("warn", "No SASL mechanisms to offer"); end else features:tag("bind", bind_attr):tag("required"):up():up(); |