From 0ff5b6eaed16bb2e98f7295e53efe3fb53294f92 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 21 Apr 2002 12:09:21 +0000 Subject: [PATCH] noch ein paar mehr fixes und anpassungen --- scripts/cgi-bin/eressea-confirm.py | 1 - scripts/cgi-bin/eressea-register.py | 3 +-- scripts/register/getfactions.py | 2 +- scripts/register/wait-reset.py | 23 ++++++++++++++++++----- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/scripts/cgi-bin/eressea-confirm.py b/scripts/cgi-bin/eressea-confirm.py index 7d0ef5da6..75c12781e 100755 --- a/scripts/cgi-bin/eressea-confirm.py +++ b/scripts/cgi-bin/eressea-confirm.py @@ -10,7 +10,6 @@ import os import re # specify the filename of the template file -scripturl="http://eressea.upb.de/cgi-bin/eressea/eressea-confirm.py" HTMLTemplate = "eressea.html" DefaultTitle = "Eressea Anmeldung" dbname = "eressea" diff --git a/scripts/cgi-bin/eressea-register.py b/scripts/cgi-bin/eressea-register.py index a07125b5a..8cd63849e 100755 --- a/scripts/cgi-bin/eressea-register.py +++ b/scripts/cgi-bin/eressea-register.py @@ -13,7 +13,6 @@ import smtplib from whrandom import choice # specify the filename of the template file -scripturl="http://eressea.upb.de/cgi-bin/eressea/eressea-register.py" HTMLTemplate = "eressea.html" MailTemplate="register.mail" DefaultTitle = "Eressea Anmeldung" @@ -23,7 +22,7 @@ locale="de" smtpserver = 'localhost' db=None game_id=0 # Eressea Main game -tutorial_id=None # +tutorial_id=None # 1 to active, None to disable tutorials # define a new function called Display # it takes one parameter - a string to Display diff --git a/scripts/register/getfactions.py b/scripts/register/getfactions.py index 67cfb28aa..026d1df80 100755 --- a/scripts/register/getfactions.py +++ b/scripts/register/getfactions.py @@ -16,7 +16,7 @@ def genpasswd(): newpasswd = newpasswd + choice(chars) return newpasswd -query = "select distinct u.email, s.id, s.password, r.name, u.locale, s.bonus from users u, races r, subscriptions s left join userips i on u.id=i.user left join bannedips b on i.ip=b.ip where s.user=u.id and b.ip is NULL and u.status='CONFIRMED' and r.race=s.race and s.game="+str(game_id)+" and r.locale='de' order by u.id" +query = "select distinct u.email, s.id, s.password, r.name, u.locale, s.bonus from users u, races r, subscriptions s left join userips i on u.id=i.user left join bannedips b on i.ip=b.ip where s.user=u.id and b.ip is NULL and s.status='CONFIRMED' and r.race=s.race and s.game="+str(game_id)+" and r.locale='de' order by u.id" db=MySQLdb.connect(db=dbname) cursor = db.cursor() c = db.cursor() diff --git a/scripts/register/wait-reset.py b/scripts/register/wait-reset.py index 5f228cd40..9fac406ff 100755 --- a/scripts/register/wait-reset.py +++ b/scripts/register/wait-reset.py @@ -21,9 +21,10 @@ MailTemplate="templates/register.mail" smtpserver='localhost' server=smtplib.SMTP(smtpserver) patchdir='/home/eressea/eressea-rsync' +game_id=0 def Patch(): - i = cursor.execute("select name, patch from games where id=0") + i = cursor.execute("select name, patch from games where id="+str(game_id)) name, patch = cursor.fetchone() print "Auswertung für " + name + " Patch Level " + str(int(patch)) + ", Runde "+str(lastturn) while os.access(patchdir+'/patch-'+str(int(patch+1))+'.sql', os.F_OK): @@ -50,13 +51,25 @@ def Send(email, custid, firstname, password, position, locale): return Patch() -cursor.execute("update users set status='EXPIRED' where TO_DAYS(updated)