Software /
code /
prosody
Comparison
plugins/mod_c2s.lua @ 5120:bcabea740c00
mod_{admin_telnet,c2s,component,http,net_multiplex,s2s}: Use module:provides() instead of module:add_item().
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 12 Sep 2012 22:22:31 +0500 (2012-09-12) |
parent | 5097:6c52a7a881cc |
child | 5228:edabb34417b7 |
comparison
equal
deleted
inserted
replaced
5119:d868ce990838 | 5120:bcabea740c00 |
---|---|
247 | 247 |
248 function listener.associate_session(conn, session) | 248 function listener.associate_session(conn, session) |
249 sessions[conn] = session; | 249 sessions[conn] = session; |
250 end | 250 end |
251 | 251 |
252 module:add_item("net-provider", { | 252 module:provides("net", { |
253 name = "c2s"; | 253 name = "c2s"; |
254 listener = listener; | 254 listener = listener; |
255 default_port = 5222; | 255 default_port = 5222; |
256 encryption = "starttls"; | 256 encryption = "starttls"; |
257 multiplex = { | 257 multiplex = { |
258 pattern = "^<.*:stream.*%sxmlns%s*=%s*(['\"])jabber:client%1.*>"; | 258 pattern = "^<.*:stream.*%sxmlns%s*=%s*(['\"])jabber:client%1.*>"; |
259 }; | 259 }; |
260 }); | 260 }); |
261 | 261 |
262 module:add_item("net-provider", { | 262 module:provides("net", { |
263 name = "legacy_ssl"; | 263 name = "legacy_ssl"; |
264 listener = listener; | 264 listener = listener; |
265 encryption = "ssl"; | 265 encryption = "ssl"; |
266 multiplex = { | 266 multiplex = { |
267 pattern = "^<.*:stream.*%sxmlns%s*=%s*(['\"])jabber:client%1.*>"; | 267 pattern = "^<.*:stream.*%sxmlns%s*=%s*(['\"])jabber:client%1.*>"; |