mcbot/cmds/rfc.lua
changeset 32 96bce644394a
parent 31 71bf91612a33
child 34 ca01a1696cff
equal deleted inserted replaced
31:71bf91612a33 32:96bce644394a
     4 -- Mikael BERTHE, 2010-04-17
     4 -- Mikael BERTHE, 2010-04-17
     5 
     5 
     6 -- TXT index database, retrieved from
     6 -- TXT index database, retrieved from
     7 -- <ftp://ftp.rfc-editor.org/in-notes/rfc-index.txt>
     7 -- <ftp://ftp.rfc-editor.org/in-notes/rfc-index.txt>
     8 local indexfname = "/home/mikael/.mcabber/lua/mcbot/rfc-index.txt"
     8 local indexfname = "/home/mikael/.mcabber/lua/mcbot/rfc-index.txt"
       
     9 
       
    10 local urlbase = "http://tools.ietf.org/html/rfc"
     9 
    11 
    10 local rfc = { ["desc"] = "Search RFC database" }
    12 local rfc = { ["desc"] = "Search RFC database" }
    11 
    13 
    12 local rfcdb = {}
    14 local rfcdb = {}
    13 
    15 
    95         r = r .. "Updated by:\t" .. data.updated_by .. "\n"
    97         r = r .. "Updated by:\t" .. data.updated_by .. "\n"
    96     end
    98     end
    97     if data.also then
    99     if data.also then
    98         r = r .. "Also:\t" .. data.also .. "\n"
   100         r = r .. "Also:\t" .. data.also .. "\n"
    99     end
   101     end
   100     r = r:gsub("\n$", "")
   102     r = r .. "URL:\t" .. urlbase..rfcnum
   101     return r
   103     return r
   102 end
   104 end
   103 
   105 
   104 function rfc.cmd (rfcnum)
   106 function rfc.cmd (rfcnum)
   105     local empty = true
   107     local empty = true