plugins/autosubscribe.lua@ce671935f504
plugins/autosubscribe.lua
Thu, 09 Jul 2015 14:38:47 +0200
- author
- Kim Alvefur <zash@zash.se>
- date
- Thu, 09 Jul 2015 14:38:47 +0200
- changeset 123
- ce671935f504
- parent 19
-
a698d64fc929
- permissions
- -rw-r--r--
plugins.xkcd2: Use table.maxn as there may be holes in the list
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