aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/coins.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/coins.py b/modules/coins.py
index 1a101c23..2498eb85 100644
--- a/modules/coins.py
+++ b/modules/coins.py
@@ -446,7 +446,9 @@ class Module(ModuleManager.BaseModule):
:help: By ticket(s) for the lottery
:usage: [amount]
"""
- amount = event["args_split"][0]
+ amount = 1
+ if event["args_split"]:
+ amount = event["args_split"][0]
if not amount.isdigit():
event["stderr"].write("%s: Please provide a positive number "
"of tickets to buy" % event["user"].nickname)