author | Mikael Berthe <mikael@lilotux.net> |
Tue, 27 Nov 2012 16:36:17 +0100 | |
changeset 67 | 5c756a9d7d8c |
parent 52 | 4efe459ca7f1 |
permissions | -rw-r--r-- |
25 | 1 |
|
2 |
-- Ugly module with hardcoded URLs to the XMPP draft URLs... |
|
51
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
3 |
-- Also, see http://datatracker.ietf.org/doc/ |
25 | 4 |
|
5 |
local xmpp = { ["desc"] = "Give URLs to XMPP documents" } |
|
6 |
||
7 |
function xmpp.cmd (args) |
|
51
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
8 |
--[[ |
25 | 9 |
local xmppbaseurl = "http://datatracker.ietf.org/doc/" |
10 |
local urls = {} |
|
11 |
||
12 |
urls["3920"] = { |
|
13 |
["desc"] = "Core", |
|
14 |
["url"] = xmppbaseurl.."draft-ietf-xmpp-3920bis/", |
|
15 |
} |
|
16 |
urls["3921"] = { |
|
17 |
["desc"] = "Instant Messaging and Presence", |
|
18 |
["url"] = xmppbaseurl.."draft-ietf-xmpp-3921bis/", |
|
19 |
} |
|
51
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
20 |
--]] |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
21 |
|
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
22 |
local xmppbaseurl = "http://tools.ietf.org/html/" |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
23 |
local urls = {} |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
24 |
|
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
25 |
urls["6120"] = { |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
26 |
["desc"] = "Core", |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
27 |
["url"] = xmppbaseurl.."rfc6120", |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
28 |
} |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
29 |
urls["6121"] = { |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
30 |
["desc"] = "Instant Messaging and Presence", |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
31 |
["url"] = xmppbaseurl.."rfc6121", |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
32 |
} |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
33 |
urls["6122"] = { |
52
4efe459ca7f1
xmpp: fix new link description (RFC6122)
Mikael Berthe <mikael@lilotux.net>
parents:
51
diff
changeset
|
34 |
["desc"] = "Address Format", |
51
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
35 |
["url"] = xmppbaseurl.."rfc6122", |
a3e9f8f9d969
xmpp: update links (new XMPP RFC)
Mikael Berthe <mikael@lilotux.net>
parents:
25
diff
changeset
|
36 |
} |
25 | 37 |
|
38 |
local r = "XMPP is the eXtensible Messaging and Presence Protocol. See:\n" |
|
39 |
for k, urltable in pairs(urls) do |
|
40 |
r = r .. urltable.desc..": <"..urltable.url..">\n" |
|
41 |
end |
|
42 |
r = r:gsub("\n+$", "") |
|
43 |
||
44 |
return r |
|
45 |
end |
|
46 |
||
47 |
mcbot_register_command("xmpp", xmpp) |