Comparison

plugins/mod_saslauth.lua @ 6304:ace08821e4ee

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Fri, 04 Jul 2014 23:05:27 +0200
parent 6302:76699a0ae4c4
child 6424:89c42aff8510
comparison
equal deleted inserted replaced
6290:54e748acc07a 6304:ace08821e4ee
282 module:hook("iq/self/urn:ietf:params:xml:ns:xmpp-bind:bind", function(event) 282 module:hook("iq/self/urn:ietf:params:xml:ns:xmpp-bind:bind", function(event)
283 local origin, stanza = event.origin, event.stanza; 283 local origin, stanza = event.origin, event.stanza;
284 local resource; 284 local resource;
285 if stanza.attr.type == "set" then 285 if stanza.attr.type == "set" then
286 local bind = stanza.tags[1]; 286 local bind = stanza.tags[1];
287 resource = bind:child_with_name("resource"); 287 resource = bind:get_child("resource");
288 resource = resource and #resource.tags == 0 and resource[1] or nil; 288 resource = resource and #resource.tags == 0 and resource[1] or nil;
289 end 289 end
290 local success, err_type, err, err_msg = sm_bind_resource(origin, resource); 290 local success, err_type, err, err_msg = sm_bind_resource(origin, resource);
291 if success then 291 if success then
292 origin.send(st.reply(stanza) 292 origin.send(st.reply(stanza)