--- a/mcbot/cmds/xep.lua Thu Apr 15 18:35:13 2010 +0200
+++ b/mcbot/cmds/xep.lua Thu Apr 15 18:57:38 2010 +0200
@@ -6,6 +6,8 @@
local xeplisturl = "curl http://xmpp.org/extensions/xeps.xml"
+local xep = { ["desc"] = "Lookup XEP database" }
+
local xeps = {}
-- parse_xep() from Matthew Wild (aka MattJ)
@@ -32,7 +34,7 @@
end
-- Deeply inspired by MattJ's riddim bot
-local function lookup_xep (xepstr)
+function xep.cmd (xepstr)
if (xepstr) then
xepstr = xepstr:gsub("[%s%?%.%!]+$", "")
local n = xepstr:upper():match("^XEP[%-%s]?(%d+)$")
@@ -75,4 +77,4 @@
return nil, "Sorry, not matching XEP found"
end
-mcbot_register_command("xep", lookup_xep)
+mcbot_register_command("xep", xep)