aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/badges.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/badges.py b/modules/badges.py
index a6d76ee5..21531c7c 100644
--- a/modules/badges.py
+++ b/modules/badges.py
@@ -60,10 +60,14 @@ class Module(ModuleManager.BaseModule):
dt = utils.datetime.utcnow()
else:
dt = event["spec"][2]
+
+ exists = event["spec"][1] in badges
+ action = "updated" if exists else "added"
+
badges[event["spec"][1]] = utils.datetime.format.iso8601(dt)
human = utils.datetime.format.date_human(dt)
- event["stdout"].write("%s: added badge %s (%s)"
- % (event["user"].nickname, event["spec"][1], human))
+ event["stdout"].write("%s: %s badge %s (%s)"
+ % (event["user"].nickname, action, event["spec"][1], human))
elif event["spec"][0] == "remove":
if not event["spec"][1] in badges: