--- 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