plugins/bind.lua

changeset 43
a33036b7e5ab
parent 40
afd037420977
child 78
f4188eff53a7
--- a/plugins/bind.lua	Sun Jan 03 18:01:54 2010 +0000
+++ b/plugins/bind.lua	Mon Jan 04 15:21:32 2010 +0000
@@ -16,8 +16,8 @@
 					stream.jid, stream.bound = result_jid, true;
 					stream:event("binding-success", full_jid);
 				elseif reply.attr.type == "error" then
-					local err = result:child_with_name("error");
-					local type, condition, text = result:get_error();
+					local err = reply:child_with_name("error");
+					local type, condition, text = reply:get_error();
 					stream:event("binding-failure", { error = condition, text = text, type = type });
 				end
 			end);

mercurial