plugins/autosubscribe.lua

Wed, 13 May 2015 13:23:33 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 13 May 2015 13:23:33 +0100
changeset 116
0735c0b39d4a
parent 19
a698d64fc929
permissions
-rw-r--r--

Add COPYING


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

mercurial