Add keys for posters, ctfd now generates flagger tokens

This commit is contained in:
Neale Pickett 2009-10-07 08:19:06 -06:00
parent 43a4ff2d59
commit 36daf80cf7
5 changed files with 18 additions and 10 deletions

18
ctfd.py
View File

@ -1,13 +1,13 @@
#! /usr/bin/env python3
import asyncore
import pointsd
import game
import flagd
import histogram
import config
import os
import sys
import optparse
from ctf import pointsd
from ctf import flagd
from ctf import histogram
from ctf import config
do_reap = False
@ -27,6 +27,14 @@ def sigchld(signum, frame):
do_reap = True
def main():
p = optparse.OptionParser()
p.add_option('-p', '--genpass', dest='cat', default=None,
help='Generate a flagger password for the given category')
opts, args = p.parse_args()
if opts.cat:
print('%s:::%s' % (opts.cat, flagd.hexdigest(opts.cat.encode('utf-8'))))
return
pointsrv = pointsd.start()
flagsrv = flagd.start()

View File

@ -60,8 +60,8 @@ class Kevin(irc.Bot):
def cmd_PRIVMSG(self, sender, forum, addl):
text = addl[0]
if text.startswith('!'):
parts = text[1:].lower().split(' ', 1)
cmd = parts[0]
parts = text[1:].split(' ', 1)
cmd = parts[0].lower()
if len(parts) > 1:
args = parts[1]
else:

View File

@ -1 +1 @@
You're well on your way :)

View File

@ -1 +1 @@
-462766

View File

@ -1 +1 @@
3acd767f2717b84076cdcd18e882f01d