equal
deleted
inserted
replaced
1 |
1 |
2 require "libs.shcmd" |
2 require "libs.shcmd" |
|
3 |
|
4 local mcabber_bts = { ["desc"] = "Query mcabber (crew) BTS" } |
3 |
5 |
4 local function get_issue_details (num) |
6 local function get_issue_details (num) |
5 local item |
7 local item |
6 |
8 |
7 num = tonumber(num); |
9 num = tonumber(num); |
26 if item then issue.type = item end |
28 if item then issue.type = item end |
27 |
29 |
28 return issue |
30 return issue |
29 end |
31 end |
30 |
32 |
31 local function mcabber_bts (num) |
33 function mcabber_bts.cmd (num) |
32 -- Check that xepnum is a valid number |
34 -- Check that xepnum is a valid number |
33 if num then num = num:gsub("[%s%?%.%!]+$", "") end |
35 if num then num = num:gsub("[%s%?%.%!]+$", "") end |
34 num = tonumber(num) |
36 num = tonumber(num) |
35 if not num or num < 1 then |
37 if not num or num < 1 then |
36 return nil, "Please provide an issue number" |
38 return nil, "Please provide an issue number" |