capscan.lua

changeset 4
9a4a18d11166
parent 2
b89fe0449b96
child 5
db500386b9c4
equal deleted inserted replaced
3:6d73aab94365 4:9a4a18d11166
31 31
32 local contacts = {}; 32 local contacts = {};
33 33
34 conn:hook("ready", function () 34 conn:hook("ready", function ()
35 conn:hook("presence", function (presence) 35 conn:hook("presence", function (presence)
36 if contacts[presence.attr.from] then return; end; 36 if contacts[presence.attr.from] or presence.attr.type then return; end;
37 37
38 local contact = { jid = presence.attr.from }; 38 local contact = { jid = presence.attr.from };
39 contacts[contact.jid] = contact; 39 contacts[contact.jid] = contact;
40 40
41 local caps_tag = presence:get_child("c", xmlns_caps); 41 local caps_tag = presence:get_child("c", xmlns_caps);

mercurial