summaryrefslogtreecommitdiff
path: root/damnspam.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2015-01-02 01:19:10 +0100
committerjomo <github@jomo.tv>2015-01-02 01:19:10 +0100
commita51e715bc742ed9b717d3b666748d7ba4eb4699f (patch)
treec33aad2f214f3776556f92e5789005feaf1a2ca3 /damnspam.py
parent24cbcb94ab2e3db77674076a9c80e2337830eb45 (diff)
using checkargs
Diffstat (limited to 'damnspam.py')
-rw-r--r--damnspam.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/damnspam.py b/damnspam.py
index 17aa832..c259aa0 100644
--- a/damnspam.py
+++ b/damnspam.py
@@ -31,7 +31,10 @@ def on_dammnspam_command(sender, args):
global changing_input
plugin_header(sender, "DamnSpam")
- if len(args) in [1,2]:
+ if not checkargs(sender, args, 1, 2):
+ msg(sender, "&c/damnspam <seconds> &e(Buttons/Levers)")
+ msg(sender, "&c/damnspam <seconds after off> <seconds after on> &e(Levers only)")
+ return True
if not is_creative(sender):
msg(sender, "&cYou can only do this in Creative mode.")
@@ -93,10 +96,6 @@ def on_dammnspam_command(sender, args):
msg(sender, "&aSuccessfully set a timeout for this %s." % ttype.lower().replace("_", " "))
return True
- else:
- msg(sender, "&c/damnspam <seconds> &e(Buttons/Levers)")
- msg(sender, "&c/damnspam <seconds after off> <seconds after on> &e(Levers only)")
-
@hook.event("block.BlockBreakEvent", "normal")
def on_block_break(event):