diff options
-rw-r--r-- | blockplacemods.py | 3 | ||||
-rw-r--r-- | damnspam.py | 2 | ||||
-rwxr-xr-x | helpers.py | 10 |
3 files changed, 12 insertions, 3 deletions
diff --git a/blockplacemods.py b/blockplacemods.py index fd7071e..8d18699 100644 --- a/blockplacemods.py +++ b/blockplacemods.py @@ -150,7 +150,8 @@ def toggle_command(sender, command, label, args): if arg2 == "clear": if enabled: del values[uuid] - return " &aDisabled " + details[1] + return " &aDisabled " + details[1] + return " &cAlready disabled: " + details[1] if arg2 == "details": return " &aSetting %s:\n &9%s \n&6Accepted arguments: [<slot>|clear|details]" % (setting, details[2]) diff --git a/damnspam.py b/damnspam.py index 83dfb5f..e9f9b84 100644 --- a/damnspam.py +++ b/damnspam.py @@ -47,8 +47,6 @@ def on_dammnspam_command(sender, command, label, args): timeout_on = round(float(timeout_on), 2) timeout_off = timeout_on if 60 >= timeout_on <= -2 or timeout_on == 0: - timeout_on = False - if timeout_on == False: msg(sender, "&cThe timeout must be within 0-60 or -1.") return True except ValueError: @@ -314,3 +314,13 @@ def array_to_list(array): for a in array: return_list += [a] return return_list + + +#debug wrapper +def debug(func): + def wrap(*args, **kwargs): + try: + func(*args, **kwargs) + except: + print(trace()) + return wrap |