diff -r 37f5966cff15 -r 9f8cacfca7c7 plugins/disco.lua --- a/plugins/disco.lua Wed Aug 25 16:27:30 2010 +0100 +++ b/plugins/disco.lua Thu Aug 26 17:48:57 2010 +0100 @@ -99,6 +99,19 @@ end end + function stream:add_disco_item(item, node) + local disco_items = self.disco.items; + if node then + disco_items = self.disco.nodes[node]; + if not disco_items then + disco_items = { features = {}, items = {} }; + self.disco.nodes[node] = disco_items; + disco_items = disco_items.items; + end + end + table.insert(disco_items, item); + end + function stream:jid_has_identity(jid, category, type) local cached_disco = self.disco.cache[jid]; if not cached_disco then