Comparison

plugins/mod_compression.lua @ 1670:23bb280c5eac

Remove unwanted spaces.
author Tobias Markmann <tm@ayena.de>
date Wed, 12 Aug 2009 20:09:07 +0200
parent 1669:b8eec163a823
child 1671:d196ac213104
comparison
equal deleted inserted replaced
1669:b8eec163a823 1670:23bb280c5eac
11 local xmlns_compression_feature = "http://jabber.org/features/compress" 11 local xmlns_compression_feature = "http://jabber.org/features/compress"
12 local xmlns_compression_protocol = "http://jabber.org/protocol/compress" 12 local xmlns_compression_protocol = "http://jabber.org/protocol/compress"
13 local compression_stream_feature = st.stanza("compression", {xmlns=xmlns_compression_feature}):tag("method"):text("zlib"):up(); 13 local compression_stream_feature = st.stanza("compression", {xmlns=xmlns_compression_feature}):tag("method"):text("zlib"):up();
14 14
15 15
16 module:add_event_hook("stream-features", 16 module:add_event_hook("stream-features",
17 function (session, features) 17 function (session, features)
18 features:add_child(compression_stream_feature); 18 features:add_child(compression_stream_feature);
19 end 19 end
20 ); 20 );
21 21
22 module:add_handler("c2s_unauthed", "compress", xmlns_compression_protocol, 22 module:add_handler("c2s_unauthed", "compress", xmlns_compression_protocol,
23 function(session, stanza) 23 function(session, stanza)
24 -- checking if the compression method is supported 24 -- checking if the compression method is supported
25 local method = stanza:child_with_name("method")[1]; 25 local method = stanza:child_with_name("method")[1];
26 if method == "zlib" then 26 if method == "zlib" then
27 session.log("info", method.." compression selected."); 27 session.log("info", method.." compression selected.");