mcbot/cmds/xmpp.lua
changeset 51 a3e9f8f9d969
parent 25 788c62c29e18
child 52 4efe459ca7f1
equal deleted inserted replaced
50:070e5b83b408 51:a3e9f8f9d969
     1 
     1 
     2 -- Ugly module with hardcoded URLs to the XMPP draft URLs...
     2 -- Ugly module with hardcoded URLs to the XMPP draft URLs...
       
     3 -- Also, see http://datatracker.ietf.org/doc/
     3 
     4 
     4 local xmpp = { ["desc"] = "Give URLs to XMPP documents" }
     5 local xmpp = { ["desc"] = "Give URLs to XMPP documents" }
     5 
     6 
     6 function xmpp.cmd (args)
     7 function xmpp.cmd (args)
       
     8     --[[
     7     local xmppbaseurl = "http://datatracker.ietf.org/doc/"
     9     local xmppbaseurl = "http://datatracker.ietf.org/doc/"
     8     local urls = {}
    10     local urls = {}
     9 
    11 
    10     urls["3920"] = {
    12     urls["3920"] = {
    11         ["desc"] = "Core",
    13         ["desc"] = "Core",
    12         ["url"] = xmppbaseurl.."draft-ietf-xmpp-3920bis/",
    14         ["url"] = xmppbaseurl.."draft-ietf-xmpp-3920bis/",
    13     }
    15     }
    14     urls["3921"] = {
    16     urls["3921"] = {
    15         ["desc"] = "Instant Messaging and Presence",
    17         ["desc"] = "Instant Messaging and Presence",
    16         ["url"] = xmppbaseurl.."draft-ietf-xmpp-3921bis/",
    18         ["url"] = xmppbaseurl.."draft-ietf-xmpp-3921bis/",
       
    19     }
       
    20     --]]
       
    21 
       
    22     local xmppbaseurl = "http://tools.ietf.org/html/"
       
    23     local urls = {}
       
    24 
       
    25     urls["6120"] = {
       
    26         ["desc"] = "Core",
       
    27         ["url"] = xmppbaseurl.."rfc6120",
       
    28     }
       
    29     urls["6121"] = {
       
    30         ["desc"] = "Instant Messaging and Presence",
       
    31         ["url"] = xmppbaseurl.."rfc6121",
       
    32     }
       
    33     urls["6122"] = {
       
    34         ["desc"] = "Instant Messaging and Presence",
       
    35         ["url"] = xmppbaseurl.."rfc6122",
    17     }
    36     }
    18 
    37 
    19     local r = "XMPP is the eXtensible Messaging and Presence Protocol. See:\n"
    38     local r = "XMPP is the eXtensible Messaging and Presence Protocol. See:\n"
    20     for k, urltable in pairs(urls) do
    39     for k, urltable in pairs(urls) do
    21         r = r .. urltable.desc..": <"..urltable.url..">\n"
    40         r = r .. urltable.desc..": <"..urltable.url..">\n"