plugins/autosubscribe.lua@2c570064f582
plugins/autosubscribe.lua
Thu, 09 Jul 2015 22:48:55 +0200
- author
- Kim Alvefur <zash@zash.se>
- date
- Thu, 09 Jul 2015 22:48:55 +0200
- changeset 125
- 2c570064f582
- parent 19
-
a698d64fc929
- permissions
- -rw-r--r--
plugins.version: Put friendly errors in a table
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