Software /
code /
prosody
Changeset
5231:4f9135e6c2f9
Merge 0.9->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Dec 2012 12:39:49 +0100 |
parents | 5226:c918aafb9c2e (current diff) 5230:6f5640375358 (diff) |
children | 5239:cf4954f1c35a |
files | |
diffstat | 4 files changed, 25 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Tue Dec 04 20:11:41 2012 +0000 +++ b/plugins/mod_admin_telnet.lua Sun Dec 09 12:39:49 2012 +0100 @@ -960,14 +960,15 @@ return nil, "No such host"; end local print = self.session.print; - local count = 0; + local total, matches = 0, 0; for user in um.users(host) do if not pat or user:match(pat) then print(user.."@"..host); + matches = matches + 1; end - count = count + 1; + total = total + 1; end - return true, count .. " users total"; + return true, "Showing "..(pat and (matches.." of ") or "all " )..total.." users"; end def_env.xmpp = {};
--- a/plugins/mod_auth_anonymous.lua Tue Dec 04 20:11:41 2012 +0000 +++ b/plugins/mod_auth_anonymous.lua Sun Dec 09 12:39:49 2012 +0100 @@ -41,6 +41,10 @@ return new_sasl(module.host, anonymous_authentication_profile); end +function provider.users() + return next, hosts[host].sessions, nil; +end + -- datamanager callback to disable writes local function dm_callback(username, host, datastore, data) if host == module.host then
--- a/plugins/mod_c2s.lua Tue Dec 04 20:11:41 2012 +0000 +++ b/plugins/mod_c2s.lua Sun Dec 09 12:39:49 2012 +0100 @@ -66,6 +66,14 @@ -- since we now have a new stream header, session is secured if session.secure == false then session.secure = true; + + -- Check if TLS compression is used + local sock = session.conn:socket(); + if sock.info then + session.compressed = sock:info"compression"; + elseif sock.compression then + session.compressed = sock:compression(); --COMPAT mw/luasec-hg + end end local features = st.stanza("stream:features"); @@ -189,6 +197,14 @@ -- Client is using legacy SSL (otherwise mod_tls sets this flag) if conn:ssl() then session.secure = true; + + -- Check if TLS compression is used + local sock = conn:socket(); + if sock.info then + session.compressed = sock:info"compression"; + elseif sock.compression then + session.compressed = sock:compression(); --COMPAT mw/luasec-hg + end end if opt_keepalives then
--- a/plugins/mod_http.lua Tue Dec 04 20:11:41 2012 +0000 +++ b/plugins/mod_http.lua Sun Dec 09 12:39:49 2012 +0100 @@ -88,7 +88,7 @@ local data = handler; handler = function () return data; end elseif event_name:sub(-2, -1) == "/*" then - local base_path_len = #event_name:match("(/.+/)%*$")+1; + local base_path_len = #event_name:match("/.+$"); local _handler = handler; handler = function (event) local path = event.request.path:sub(base_path_len);