summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDipesh Amin <yaypunkrock@gmail.com>2012-04-09 17:50:48 +0100
committerDipesh Amin <yaypunkrock@gmail.com>2012-04-09 17:50:48 +0100
commit5079421781f84f353676d9caa95edec7c799e883 (patch)
treecb18f716c3a4bc4eaf4577d55405bac0f93216f1
parent8754b59461477ccb1f93c215a2b49935306d13b0 (diff)
downloadmanamarket-5079421781f84f353676d9caa95edec7c799e883.tar.gz
manamarket-5079421781f84f353676d9caa95edec7c799e883.tar.bz2
manamarket-5079421781f84f353676d9caa95edec7c799e883.tar.xz
manamarket-5079421781f84f353676d9caa95edec7c799e883.zip
Add: record the time of !add and !relist
To make it possible to do a purge of users in a few months.
-rwxr-xr-xmain.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.py b/main.py
index 6978401..1654b3d 100755
--- a/main.py
+++ b/main.py
@@ -577,6 +577,8 @@ def process_whisper(nick, msg, mapserv):
sale_tree.get_uid(uid).set('relisted', str(time_relisted + 1))
sale_tree.save()
mapserv.sendall(whisper(nick, "The item has been successfully relisted."))
+ user_tree.get_user(nick).set('last_use', str(time.time()))
+ user_tree.save()
else:
mapserv.sendall(whisper(nick, "This item can no longer be relisted. Please collect it using !getback "+str(uid)+"."))
return
@@ -1045,6 +1047,7 @@ def main():
sale_tree.add_item(trader_state.item.player, trader_state.item.id, trader_state.item.amount, trader_state.item.price)
user_tree.get_user(trader_state.item.player).set('used_stalls', \
str(int(user_tree.get_user(trader_state.item.player).get('used_stalls')) + 1))
+ user_tree.get_user(trader_state.item.player).set('last_use', str(time.time()))
commitMessage = "Add"
elif trader_state.item.get == 0: # !buy \ !getback