From fc74613190a83799ed7c80c98776f7ce8f65fbdb Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 3 Mar 2012 00:01:10 +0100 Subject: mod_dialback: Remove unused import of s2smanager.send_to_host() --- plugins/mod_dialback.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'plugins/mod_dialback.lua') diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua index 977e58c3..eccfd3d6 100644 --- a/plugins/mod_dialback.lua +++ b/plugins/mod_dialback.lua @@ -9,7 +9,6 @@ local format = string.format; local hosts = _G.hosts; -local send_s2s = require "core.s2smanager".send_to_host; local s2s_make_authenticated = require "core.s2smanager".make_authenticated; local log = module._log; @@ -87,7 +86,6 @@ module:hook("stanza/jabber:server:dialback:result", function(event) end origin.log("debug", "asking %s if key %s belongs to them", attr.from, stanza[1]); - --send_s2s(attr.to, attr.from, origin.send(st.stanza("db:verify", { from = attr.to, to = attr.from, id = origin.streamid }):text(stanza[1])); return true; end -- cgit v1.2.3 From 71528cdc3726be326d6a0afb76f490b7d3c4fcc6 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 3 Mar 2012 01:35:39 +0100 Subject: mod_s2s, mod_dialback: Event on pre-XMPP streams, so we can try dialback. --- plugins/mod_dialback.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins/mod_dialback.lua') diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua index eccfd3d6..5cb59fef 100644 --- a/plugins/mod_dialback.lua +++ b/plugins/mod_dialback.lua @@ -160,6 +160,11 @@ module:hook_stanza(xmlns_stream, "features", function (origin, stanza) end end, 100); +module:hook("s2s-no-stream-features", function (event) + initiate_dialback(event.origin); + return true; +end, 100); + -- Offer dialback to incoming hosts module:hook("s2s-stream-features", function (data) data.features:tag("dialback", { xmlns='urn:xmpp:features:dialback' }):up(); -- cgit v1.2.3