fix plugHeader, store last time

This commit is contained in:
jomo
2014-07-14 05:32:14 +02:00
parent 665fbcb430
commit 5cee964b9c

View File

@@ -127,5 +127,7 @@ def onInteract(event):
checktime = data["timeout_on"] if powered else data["timeout_off"] checktime = data["timeout_on"] if powered else data["timeout_off"]
if data["last_time"] + checktime < now(): if data["last_time"] + checktime < now():
event.setCancelled(True) event.setCancelled(True)
plugHeader("DamnSpam") plugHeader(sender, "DamnSpam")
msg(sender, "&cThis %s has a timeout of %ss." % (btype, checktime)) msg(sender, "&cThis %s has a timeout of %ss." % (btype, checktime))
else:
inputs["last_time"] = int(now())