plugins.pubsub: Re-send verse pubsub events on the bot

Fri, 11 Mar 2011 22:30:21 +0100

author
Kim Alvefur <zash@zash.se>
date
Fri, 11 Mar 2011 22:30:21 +0100
changeset 68
f388a8a57d1d
parent 67
12e2c702eddc
child 69
2d7c29310a28

plugins.pubsub: Re-send verse pubsub events on the bot

plugins/pubsub.lua file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/pubsub.lua	Fri Mar 11 22:30:21 2011 +0100
@@ -0,0 +1,9 @@
+function riddim.plugins.pubsub(bot)
+	bot.stream:add_plugin("pubsub");
+	bot.pubsub = bot.stream.pubsub;
+
+	-- Maybe pubsub/event/ns/element or something?
+	bot.stream:hook("pubsub/event", function(event)
+		return bot:event("pubsub/event", event);
+	end);
+end

mercurial