0.3->0.4
[prosody.git] / plugins / mod_dialback.lua
index 4e29b3349a79079cbcfe617eeb149eb1482de440..042e20878188fcffee21baaf947d8af854711312 100644 (file)
@@ -1,20 +1,9 @@
--- Prosody IM v0.2
--- Copyright (C) 2008 Matthew Wild
--- Copyright (C) 2008 Waqas Hussain
+-- Prosody IM v0.4
+-- Copyright (C) 2008-2009 Matthew Wild
+-- Copyright (C) 2008-2009 Waqas Hussain
 -- 
--- This program is free software; you can redistribute it and/or
--- modify it under the terms of the GNU General Public License
--- as published by the Free Software Foundation; either version 2
--- of the License, or (at your option) any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program; if not, write to the Free Software
--- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+-- This project is MIT/X11 licensed. Please see the
+-- COPYING file in the source package for more information.
 --
 
 
@@ -22,6 +11,7 @@
 local send_s2s = require "core.s2smanager".send_to_host;
 local s2s_make_authenticated = require "core.s2smanager".make_authenticated;
 local s2s_verify_dialback = require "core.s2smanager".verify_dialback;
+local s2s_destroy_session = require "core.s2smanager".destroy_session;
 
 local st = require "util.stanza";
 
@@ -120,7 +110,6 @@ module:add_handler({ "s2sout_unauthed", "s2sout" }, "result", xmlns_dialback,
                if stanza.attr.type == "valid" then
                        s2s_make_authenticated(origin, attr.from);
                else
-                       -- FIXME: Waiting on #33
-                       error("dialback failed!");
+                       s2s_destroy_session(origin)
                end
        end);