Software /
code /
verse
Comparison
plugins/bind.lua @ 43:a33036b7e5ab
verse.plugins.bind: Fix incorrect variable name causing traceback on unsuccessful bind
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 04 Jan 2010 15:21:32 +0000 |
parent | 40:afd037420977 |
child | 78:f4188eff53a7 |
comparison
equal
deleted
inserted
replaced
42:6006e6bb1c28 | 43:a33036b7e5ab |
---|---|
14 :get_text(); | 14 :get_text(); |
15 stream.username, stream.host, stream.resource = jid.split(result_jid); | 15 stream.username, stream.host, stream.resource = jid.split(result_jid); |
16 stream.jid, stream.bound = result_jid, true; | 16 stream.jid, stream.bound = result_jid, true; |
17 stream:event("binding-success", full_jid); | 17 stream:event("binding-success", full_jid); |
18 elseif reply.attr.type == "error" then | 18 elseif reply.attr.type == "error" then |
19 local err = result:child_with_name("error"); | 19 local err = reply:child_with_name("error"); |
20 local type, condition, text = result:get_error(); | 20 local type, condition, text = reply:get_error(); |
21 stream:event("binding-failure", { error = condition, text = text, type = type }); | 21 stream:event("binding-failure", { error = condition, text = text, type = type }); |
22 end | 22 end |
23 end); | 23 end); |
24 end | 24 end |
25 stream:hook("stream-features", handle_features, 200); | 25 stream:hook("stream-features", handle_features, 200); |