Allow #number in the mcabber_bts command
authorMikael Berthe <mikael@lilotux.net>
Wed, 10 Nov 2010 10:28:15 +0100
changeset 45 d333cb35e79a
parent 44 b389ddf3bbb3
child 46 6f8df1b79ab8
Allow #number in the mcabber_bts command
mcbot/cmds/mcabber_bts.lua
--- a/mcbot/cmds/mcabber_bts.lua	Mon Oct 11 10:37:03 2010 +0200
+++ b/mcbot/cmds/mcabber_bts.lua	Wed Nov 10 10:28:15 2010 +0100
@@ -35,7 +35,10 @@
 
 function mcabber_bts.cmd (num)
     -- Check that xepnum is a valid number
-    if num then num = num:gsub("[%s%?%.%!]+$", "") end
+    if num then
+        num = num:gsub("[%s%?%.%!]+$", "")
+        num = num:gsub("^#", "")
+    end
     num = tonumber(num)
     if not num or num < 1 then
         return nil, "Please provide an issue number"