mcbot/cmds/mcabber_bts.lua
changeset 45 d333cb35e79a
parent 39 237af42156a1
child 46 6f8df1b79ab8
equal deleted inserted replaced
44:b389ddf3bbb3 45:d333cb35e79a
    33     return issue
    33     return issue
    34 end
    34 end
    35 
    35 
    36 function mcabber_bts.cmd (num)
    36 function mcabber_bts.cmd (num)
    37     -- Check that xepnum is a valid number
    37     -- Check that xepnum is a valid number
    38     if num then num = num:gsub("[%s%?%.%!]+$", "") end
    38     if num then
       
    39         num = num:gsub("[%s%?%.%!]+$", "")
       
    40         num = num:gsub("^#", "")
       
    41     end
    39     num = tonumber(num)
    42     num = tonumber(num)
    40     if not num or num < 1 then
    43     if not num or num < 1 then
    41         return nil, "Please provide an issue number"
    44         return nil, "Please provide an issue number"
    42     end
    45     end
    43     local issue = get_issue_details(num)
    46     local issue = get_issue_details(num)