Software /
code /
prosody
Changeset
5668:5a9318ac92f6
mod_c2s: Become a shared module and allow being disabled on some virtualhosts
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 11 Jun 2013 21:18:51 +0200 |
parents | 5667:0bf1cdea43f6 |
children | 5669:9345c161481f |
files | plugins/mod_c2s.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Tue Jun 11 12:55:47 2013 -0400 +++ b/plugins/mod_c2s.lua Tue Jun 11 21:18:51 2013 +0200 @@ -50,7 +50,7 @@ session.streamid = uuid_generate(); (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host); - if not hosts[session.host] then + if not hosts[session.host] or not hosts[session.host].modules.c2s then -- We don't serve this host... session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; return; @@ -273,6 +273,8 @@ sessions[conn] = session; end +function module.add_host() end + module:hook("server-stopping", function(event) local reason = event.reason; for _, session in pairs(sessions) do