plugins/autosubscribe.lua

Mon, 21 Jun 2010 14:39:19 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 21 Jun 2010 14:39:19 +0100
changeset 27
2c137706d42c
parent 19
a698d64fc929
permissions
-rw-r--r--

plugins.xeps: Add 'xep' command for looking up XMPP extensions by name or number


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