From c366bf57d997088226d0f9307dfbc8b5e7d7de48 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 23 Jan 2012 02:15:28 +0000 Subject: mod_c2s: Code reduction --- plugins/mod_c2s.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/mod_c2s.lua') diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 4d7318a5..682c4e3b 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -39,13 +39,12 @@ local default_stream_attr = { ["xmlns:stream"] = "http://etherx.jabber.org/strea function stream_callbacks.streamopened(session, attr) local send = session.send; - session.host = attr.to; + session.host = nameprep(attr.to); if not session.host then session:close{ condition = "improper-addressing", - text = "A 'to' attribute is required on stream headers" }; + text = "A valid 'to' attribute is required on stream headers" }; return; end - session.host = nameprep(session.host); session.version = tonumber(attr.version) or 0; session.streamid = uuid_generate(); (session.log or session)("debug", "Client sent opening to %s", session.host); -- cgit v1.2.3