Software /
code /
prosody
Comparison
plugins/mod_component.lua @ 5321:33813f000015
Merge 0.9->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 03 Feb 2013 15:52:27 +0100 |
parent | 5316:310c7e5bb906 |
child | 5370:7838acadb0fa |
comparison
equal
deleted
inserted
replaced
5303:19a4a3462574 | 5321:33813f000015 |
---|---|
258 function listener.onconnect(conn) | 258 function listener.onconnect(conn) |
259 local _send = conn.write; | 259 local _send = conn.write; |
260 local session = { type = "component_unauthed", conn = conn, send = function (data) return _send(conn, tostring(data)); end }; | 260 local session = { type = "component_unauthed", conn = conn, send = function (data) return _send(conn, tostring(data)); end }; |
261 | 261 |
262 -- Logging functions -- | 262 -- Logging functions -- |
263 local conn_name = "jcp"..tostring(conn):match("[a-f0-9]+$"); | 263 local conn_name = "jcp"..tostring(session):match("[a-f0-9]+$"); |
264 session.log = logger.init(conn_name); | 264 session.log = logger.init(conn_name); |
265 session.close = session_close; | 265 session.close = session_close; |
266 | 266 |
267 session.log("info", "Incoming Jabber component connection"); | 267 session.log("info", "Incoming Jabber component connection"); |
268 | 268 |
311 name = "component"; | 311 name = "component"; |
312 private = true; | 312 private = true; |
313 listener = listener; | 313 listener = listener; |
314 default_port = 5347; | 314 default_port = 5347; |
315 multiplex = { | 315 multiplex = { |
316 pattern = "^<.*:stream.*%sxmlns%s*=%s*(['\"])jabber:component%1.*>"; | 316 pattern = "^<.*:stream.*%sxmlns%s*=%s*(['\"])jabber:component:accept%1.*>"; |
317 }; | 317 }; |
318 }); | 318 }); |