aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-04-05 13:26:43 +0100
committerMatthew Wild <mwild1@gmail.com>2011-04-05 13:26:43 +0100
commit1cfb734e0ecde10fcd5f457c1394ecb3b7a28e2a (patch)
tree35cdd4996c2ba4c67a4805bd01e3830d1dc171f5 /plugins
parent272ca5fce11d42d9cd3b50c0f3baa03729583443 (diff)
parentca74173a8221e9cd93db30c7bb89c8b181f8b60b (diff)
downloadprosody-1cfb734e0ecde10fcd5f457c1394ecb3b7a28e2a.tar.gz
prosody-1cfb734e0ecde10fcd5f457c1394ecb3b7a28e2a.zip
Merge 0.8->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_dialback.lua3
-rw-r--r--plugins/mod_privacy.lua26
2 files changed, 2 insertions, 27 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua
index a8923e27..c1c5d920 100644
--- a/plugins/mod_dialback.lua
+++ b/plugins/mod_dialback.lua
@@ -12,7 +12,6 @@ local send_s2s = require "core.s2smanager".send_to_host;
local s2s_make_authenticated = require "core.s2smanager".make_authenticated;
local s2s_initiate_dialback = require "core.s2smanager".initiate_dialback;
local s2s_verify_dialback = require "core.s2smanager".verify_dialback;
-local s2s_destroy_session = require "core.s2smanager".destroy_session;
local log = module._log;
@@ -126,7 +125,7 @@ module:hook("stanza/jabber:server:dialback:result", function(event)
if stanza.attr.type == "valid" then
s2s_make_authenticated(origin, attr.from);
else
- s2s_destroy_session(origin)
+ origin:close("not-authorized", "dialback authentication failed");
end
return true;
end
diff --git a/plugins/mod_privacy.lua b/plugins/mod_privacy.lua
index d5842e26..2d696154 100644
--- a/plugins/mod_privacy.lua
+++ b/plugins/mod_privacy.lua
@@ -45,28 +45,6 @@ function isAnotherSessionUsingDefaultList(origin)
end
end
-function sendUnavailable(origin, to, from)
---[[ example unavailable presence stanza
-<presence from="node@host/resource" type="unavailable" to="node@host" >
- <status>Logged out</status>
-</presence>
-]]--
- local presence = st.presence({from=from, type="unavailable"});
- presence:tag("status"):text("Logged out");
-
- local node, host = jid_bare(to);
- local bare = node .. "@" .. host;
-
- local user = bare_sessions[bare];
- if user then
- for resource, session in pairs(user.sessions) do
- presence.attr.to = session.full_jid;
- module:log("debug", "send unavailable to: %s; from: %s", tostring(presence.attr.to), tostring(presence.attr.from));
- origin.send(presence);
- end
- end
-end
-
function declineList(privacy_lists, origin, stanza, which)
if which == "default" then
if isAnotherSessionUsingDefaultList(origin) then
@@ -123,7 +101,7 @@ function deleteList(privacy_lists, origin, stanza, name)
return {"modify", "bad-request", "Not existing list specifed to be deleted."};
end
-function createOrReplaceList (privacy_lists, origin, stanza, name, entries, roster)
+function createOrReplaceList (privacy_lists, origin, stanza, name, entries)
local bare_jid = origin.username.."@"..origin.host;
if privacy_lists.lists == nil then
@@ -323,7 +301,6 @@ function checkIfNeedToBeBlocked(e, session)
return; -- from one of a user's resource to another => HANDS OFF!
end
- local item;
local listname = session.activePrivacyList;
if listname == nil then
listname = privacy_lists.default; -- no active list selected, use default list
@@ -414,7 +391,6 @@ function preCheckIncoming(e)
end
if resource == nil then
local prio = 0;
- local session_;
if bare_sessions[node.."@"..host] ~= nil then
for resource, session_ in pairs(bare_sessions[node.."@"..host].sessions) do
if session_.priority ~= nil and session_.priority > prio then