plugins/mod_dialback.lua

changeset 260
182f0c895676
parent 259
1485d272400d
child 347
fba39fda0879
equal deleted inserted replaced
259:1485d272400d 260:182f0c895676
37 origin.dialback_key = stanza[1]; 37 origin.dialback_key = stanza[1];
38 log("debug", "asking %s if key %s belongs to them", origin.from_host, origin.dialback_key); 38 log("debug", "asking %s if key %s belongs to them", origin.from_host, origin.dialback_key);
39 send_s2s(origin.to_host, origin.from_host, 39 send_s2s(origin.to_host, origin.from_host,
40 format("<db:verify from='%s' to='%s' id='%s'>%s</db:verify>", origin.to_host, origin.from_host, 40 format("<db:verify from='%s' to='%s' id='%s'>%s</db:verify>", origin.to_host, origin.from_host,
41 origin.streamid, origin.dialback_key)); 41 origin.streamid, origin.dialback_key));
42 hosts[origin.from_host].dialback_verifying = origin; 42 hosts[origin.to_host].s2sout[origin.from_host].dialback_verifying = origin;
43 end); 43 end);
44 44
45 add_handler({ "s2sout_unauthed", "s2sout" }, "verify", xmlns_dialback, 45 add_handler({ "s2sout_unauthed", "s2sout" }, "verify", xmlns_dialback,
46 function (origin, stanza) 46 function (origin, stanza)
47 if origin.dialback_verifying then 47 if origin.dialback_verifying then

mercurial