aboutsummaryrefslogtreecommitdiffstats
path: root/titlebot/commands/undo
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-09-18 19:01:36 +0200
committerlassulus <lassulus@lassul.us>2018-09-18 19:01:36 +0200
commit2dfb816ddadb34e5b11676ef18c3c2f9079c8146 (patch)
tree59658869371ec5ac11fcd749cf270e1be655d1f5 /titlebot/commands/undo
parent00b26ca0bb45d0fb7989a3ddf506bd8230363a14 (diff)
throw away dead code
Diffstat (limited to 'titlebot/commands/undo')
-rwxr-xr-xtitlebot/commands/undo31
1 files changed, 0 insertions, 31 deletions
diff --git a/titlebot/commands/undo b/titlebot/commands/undo
deleted file mode 100755
index e1b0aba..0000000
--- a/titlebot/commands/undo
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python3
-import json
-from os import environ
-import sys
-import os
-# krebs polling
-import poll
-
-f = 'suggestions.json'
-db = poll.load_db(f)
-votes = []
-try:
- votes = sys.argv[1:]
-except:
- print("""usage: undo number (...)
- undos vote of one or more entries based on .list""")
- sys.exit(1)
-voter = environ['_prefix'].split("@")[1]
-voter_name = environ['_from']
-for vote in votes:
- try:
- vote = int(vote)
- if not voter in db[vote]['votes']:
- print("%s, you never voted for '%s'!"%(voter_name,db[vote]['title']))
- else:
- del(db[vote]['votes'][voter] )
- print("%s undid vote for '%s'" %(voter_name,db[vote]['title'] ))
- except:
- print("%s undo voting for #%d failed" %(voter_name,vote))
-
-poll.save_db(f,db)