Software /
code /
verse
Comparison
plugins/pep.lua @ 268:06e6c6de6438
plugins.pep: Load disco, since PEP depends on it
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 16 Dec 2011 22:04:03 +0100 |
parent | 250:a5ac643a7fd6 |
child | 380:0891b4e27766 |
comparison
equal
deleted
inserted
replaced
267:d30897e4f5c2 | 268:06e6c6de6438 |
---|---|
2 | 2 |
3 local xmlns_pubsub = "http://jabber.org/protocol/pubsub"; | 3 local xmlns_pubsub = "http://jabber.org/protocol/pubsub"; |
4 local xmlns_pubsub_event = xmlns_pubsub.."#event"; | 4 local xmlns_pubsub_event = xmlns_pubsub.."#event"; |
5 | 5 |
6 function verse.plugins.pep(stream) | 6 function verse.plugins.pep(stream) |
7 stream:add_plugin("disco"); | |
7 stream:add_plugin("pubsub"); | 8 stream:add_plugin("pubsub"); |
8 stream.pep = {}; | 9 stream.pep = {}; |
9 | 10 |
10 stream:hook("pubsub/event", function(event) | 11 stream:hook("pubsub/event", function(event) |
11 return stream:event("pep/"..event.node, { from = event.from, item = event.item.tags[1] } ); | 12 return stream:event("pep/"..event.node, { from = event.from, item = event.item.tags[1] } ); |