changeset 7 | c515e8218c87 |
parent 5 | a0b9529f17db |
child 11 | 4993fc6b1108 |
--- a/mcbot/cmds/xep.lua Tue Apr 13 22:43:43 2010 +0200 +++ b/mcbot/cmds/xep.lua Tue Apr 13 22:45:12 2010 +0200 @@ -33,7 +33,7 @@ -- Logics comes from MattJ's riddim bot local function lookup_xep (xepnum) - xepnum = xepnum:gsub("[%s%?%.%!]+$", "") + if (xepnum) then xepnum = xepnum:gsub("[%s%?%.%!]+$", "") end -- Check that xepnum is a valid number xepnum = tonumber(xepnum) if not xepnum or xepnum <= 0 or xepnum > 9999 then return nil, "What XEP?" end