Rename plugins.presence to plugins.autosubscribe

Thu, 20 May 2010 14:37:28 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 20 May 2010 14:37:28 +0100
changeset 19
a698d64fc929
parent 18
d7cd7ce93132
child 20
4f4d98345952

Rename plugins.presence to plugins.autosubscribe

plugins/autosubscribe.lua file | annotate | diff | comparison | revisions
plugins/presence.lua file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/autosubscribe.lua	Thu May 20 14:37:28 2010 +0100
@@ -0,0 +1,8 @@
+
+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
--- a/plugins/presence.lua	Thu May 20 14:36:14 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-
-function riddim.plugins.presence(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