plugins/autosubscribe.lua@5cb658e37a37
plugins/autosubscribe.lua
Thu, 07 Apr 2011 02:20:28 +0200
- author
- Kim Alvefur <zash@zash.se>
- date
- Thu, 07 Apr 2011 02:20:28 +0200
- changeset 80
- 5cb658e37a37
- parent 19
-
a698d64fc929
- permissions
- -rw-r--r--
pubsub2room: Access to attributes in templates
function riddim.plugins.autosubscribe(bot)
bot:hook("presence", function (presence)
if presence.stanza.attr.type ~= 'subscribe' then return nil; end
bot:send_presence(presence.sender.jid, 'subscribed');
return false;
end);
end