diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-29 02:10:55 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-29 02:10:55 +0100 |
commit | fe228888c0d51612e8b32adc3f9db91b7c6e8ded (patch) | |
tree | e78baabff21e9b6fefaeef4a709098ca30b35922 /plugins/mod_compression.lua | |
parent | 9d04baca862bcad5b49ac4ab0b9c3432321150d3 (diff) | |
parent | 1ee9f6e09228b268bf3f5dc985d4ba9026a72666 (diff) | |
download | prosody-fe228888c0d51612e8b32adc3f9db91b7c6e8ded.tar.gz prosody-fe228888c0d51612e8b32adc3f9db91b7c6e8ded.zip |
Merge 0.9->trunk
Diffstat (limited to 'plugins/mod_compression.lua')
-rw-r--r-- | plugins/mod_compression.lua | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/mod_compression.lua b/plugins/mod_compression.lua index 82403016..62c0fa2e 100644 --- a/plugins/mod_compression.lua +++ b/plugins/mod_compression.lua @@ -16,12 +16,8 @@ local xmlns_stream = "http://etherx.jabber.org/streams"; local compression_stream_feature = st.stanza("compression", {xmlns=xmlns_compression_feature}):tag("method"):text("zlib"):up(); local add_filter = require "util.filters".add_filter; -local compression_level = module:get_option("compression_level"); --- if not defined assume admin wants best compression -if compression_level == nil then compression_level = 9 end; +local compression_level = module:get_option_number("compression_level", 7); - -compression_level = tonumber(compression_level); if not compression_level or compression_level < 1 or compression_level > 9 then module:log("warn", "Invalid compression level in config: %s", tostring(compression_level)); module:log("warn", "Module loading aborted. Compression won't be available."); |