Comparison

plugins/mod_c2s.lua @ 4610:171051f9dd00

mod_c2s: Use module:add_item() to add the net-provider for portmanager
author Matthew Wild <mwild1@gmail.com>
date Wed, 14 Mar 2012 21:42:08 +0000
parent 4551:8f25f3b1c62f
child 4620:e9dc6ae68c69
comparison
equal deleted inserted replaced
4609:83a5377ffea2 4610:171051f9dd00
218 218
219 function listener.associate_session(conn, session) 219 function listener.associate_session(conn, session)
220 sessions[conn] = session; 220 sessions[conn] = session;
221 end 221 end
222 222
223 portmanager.register_service("c2s", { 223 module:add_item("net-provider", {
224 name = "c2s";
224 listener = listener; 225 listener = listener;
225 default_port = 5222; 226 default_port = 5222;
226 encryption = "starttls"; 227 encryption = "starttls";
227 }); 228 });
228 229
229 portmanager.register_service("legacy_ssl", { 230 module:add_item("net-provider", {
231 name = "legacy_ssl";
230 listener = listener; 232 listener = listener;
231 encryption = "ssl"; 233 encryption = "ssl";
232 }); 234 });
233 235
234 236