diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-05-11 14:57:29 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-05-11 14:57:29 +0100 |
commit | 489ea2958d2b4bfe15835cd043cbb7d376f0df62 (patch) | |
tree | 818920f7178801f9515c27546ae21da35bf9607e | |
parent | fc2d9e697bf3100d58ff783d49d6f27e65ca2179 (diff) | |
download | prosody-489ea2958d2b4bfe15835cd043cbb7d376f0df62.tar.gz prosody-489ea2958d2b4bfe15835cd043cbb7d376f0df62.zip |
mod_c2s: Another lurking string.format squashed.
-rw-r--r-- | plugins/mod_c2s.lua | 6 |
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; |