From 5cee964b9ce2743b93fa8db2b09c4bef7850ae77 Mon Sep 17 00:00:00 2001 From: jomo Date: Mon, 14 Jul 2014 05:32:14 +0200 Subject: [PATCH] fix plugHeader, store last time --- damnspam.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/damnspam.py b/damnspam.py index a86dc97..576f00e 100644 --- a/damnspam.py +++ b/damnspam.py @@ -127,5 +127,7 @@ def onInteract(event): checktime = data["timeout_on"] if powered else data["timeout_off"] if data["last_time"] + checktime < now(): event.setCancelled(True) - plugHeader("DamnSpam") - msg(sender, "&cThis %s has a timeout of %ss." % (btype, checktime)) \ No newline at end of file + plugHeader(sender, "DamnSpam") + msg(sender, "&cThis %s has a timeout of %ss." % (btype, checktime)) + else: + inputs["last_time"] = int(now()) \ No newline at end of file