equal
deleted
inserted
replaced
31 parse_xeps(xepdata) |
31 parse_xeps(xepdata) |
32 end |
32 end |
33 |
33 |
34 -- Logics comes from MattJ's riddim bot |
34 -- Logics comes from MattJ's riddim bot |
35 local function lookup_xep (xepnum) |
35 local function lookup_xep (xepnum) |
36 xepnum = xepnum:gsub("[%s%?%.%!]+$", "") |
36 if (xepnum) then xepnum = xepnum:gsub("[%s%?%.%!]+$", "") end |
37 -- Check that xepnum is a valid number |
37 -- Check that xepnum is a valid number |
38 xepnum = tonumber(xepnum) |
38 xepnum = tonumber(xepnum) |
39 if not xepnum or xepnum <= 0 or xepnum > 9999 then return nil, "What XEP?" end |
39 if not xepnum or xepnum <= 0 or xepnum > 9999 then return nil, "What XEP?" end |
40 xepnum = tostring(xepnum) |
40 xepnum = tostring(xepnum) |
41 -- Download XEP list |
41 -- Download XEP list |