From 5c7ec634b1765f8edcc8b59aff2b2b899180dc65 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 20 Nov 2008 01:33:25 +0000 Subject: Use a stanza for c2s stream features instead of an array of strings. Removes a FIXME. --- core/sessionmanager.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'core') diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index 8be7bdec..e83b7c23 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -121,18 +121,12 @@ function streamopened(session, attr) end - local features = {}; + local features = st.stanza("stream:features"); modulemanager.fire_event("stream-features", session, features); - -- FIXME: Need to send() this all at once - send(""); + send(features); - for _, feature in ipairs(features) do - send(tostring(feature)); - end - - send(""); - log("info", "Stream opened successfully"); + (session.log or log)("info", "Sent reply to client"); session.notopen = nil; end -- cgit v1.2.3