mod_privacy: Remove unused function, sendUnavailable
authorMatthew Wild <mwild1@gmail.com>
Tue, 29 Mar 2011 13:57:50 +0000 (14:57 +0100)
committerMatthew Wild <mwild1@gmail.com>
Tue, 29 Mar 2011 13:57:50 +0000 (14:57 +0100)
plugins/mod_privacy.lua

index d5842e26c74d81509c7ef7308808ebe1786cbe68..18d7b703e2d7897da8d79c09c3d670e2871c04d1 100644 (file)
@@ -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