61 end |
61 end |
62 conn.roster:add_contact(jid, item.name, groups, printor("saved")); |
62 conn.roster:add_contact(jid, item.name, groups, printor("saved")); |
63 end; |
63 end; |
64 list = function() |
64 list = function() |
65 for jid, item in pairs(conn.roster.items) do |
65 for jid, item in pairs(conn.roster.items) do |
66 local name = item.name, host or split_jid(jid); |
66 local name, host = item.name or split_jid(jid); |
67 print(name or host, jid, table.concat(item.groups or {}, ", ")); |
67 print(name or host, jid, table.concat(item.groups or {}, ", ")); |
68 end |
68 end |
69 end; |
69 end; |
70 listgroups = function(param) |
70 listgroups = function(param) |
71 local groups = {}; |
71 local groups = {}; |