aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-05-11 14:57:29 +0100
committerMatthew Wild <mwild1@gmail.com>2012-05-11 14:57:29 +0100
commit6e0cfc72675d2bf4a5de0a86567520257e092671 (patch)
tree818920f7178801f9515c27546ae21da35bf9607e
parent54c67720af8d6f1d24d2a263266fb6b32bbf9061 (diff)
downloadprosody-6e0cfc72675d2bf4a5de0a86567520257e092671.tar.gz
prosody-6e0cfc72675d2bf4a5de0a86567520257e092671.zip
mod_c2s: Another lurking string.format squashed.
-rw-r--r--plugins/mod_c2s.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 69f2298f..55c53e2d 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -17,7 +17,6 @@ local sm_new_session, sm_destroy_session = sessionmanager.new_session, sessionma
local uuid_generate = require "util.uuid".generate;
local xpcall, tostring, type = xpcall, tostring, type;
-local format = string.format;
local traceback = debug.traceback;
local xmlns_xmpp_streams = "urn:ietf:params:xml:ns:xmpp-streams";
@@ -54,8 +53,9 @@ function stream_callbacks.streamopened(session, attr)
return;
end
- send("<?xml version='1.0'?>");
- send(format("<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='%s' from='%s' version='1.0' xml:lang='en'>", session.streamid, session.host));
+ send("<?xml version='1.0'?>"..st.stanza("stream:stream", {
+ xmlns = 'jabber:client', ["xmlns:stream"] = 'http://etherx.jabber.org/streams';
+ id = session.streamid, from = session.host, version = '1.0', ["xml:lang"] = 'en' }):top_tag());
(session.log or log)("debug", "Sent reply <stream:stream> to client");
session.notopen = nil;