forked from github/server
add current version of processing scripts
fix a crash in checkpasswd
This commit is contained in:
parent
50aa3cc444
commit
95d0b2a413
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
if [ -z $ERESSEA ] ; then
|
||||
ERESSEA=$HOME/eressea
|
||||
echo "The ERESSEA environment variable is not set. Assuming $ERESSEA."
|
||||
fi
|
||||
GAME=$1
|
||||
if [ ! -d $ERESSEA/game-$GAME ]; then
|
||||
echo "No such game: game-$GAME."
|
||||
exit 1
|
||||
fi
|
||||
cd $ERESSEA/game-$GAME
|
||||
TURN=$2
|
||||
if [ -z $TURN ]; then
|
||||
TURN=$(cat turn)
|
||||
fi
|
||||
if [ ! -e data/$TURN.dat ]; then
|
||||
echo "No data for turn $TURN in game $GAME."
|
||||
exit 2
|
||||
fi
|
||||
if [ ! -d backup ] ; then
|
||||
echo "creating missing backup directory for game $GAME."
|
||||
mkdir -p ~/backup/eressea/game-$GAME
|
||||
ln -sf ~/backup/eressea/game-$GAME backup
|
||||
fi
|
||||
|
||||
files="data/$TURN.dat parteien.full parteien"
|
||||
if [ -e orders.$TURN ]; then
|
||||
files="$files orders.$TURN"
|
||||
fi
|
||||
echo "backup turn $TURN, game $GAME, files: $files"
|
||||
tar cjf backup/$TURN.tar.bz2 $files
|
|
@ -0,0 +1,16 @@
|
|||
GAME=$1
|
||||
TURN=$2
|
||||
|
||||
if [ ! -d $ERESSEA/game-$GAME ] ; then
|
||||
echo "No such game: $GAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $ERESSEA/game-$GAME
|
||||
if [ -d orders.dir.$TURN ]; then
|
||||
echo "orders.dir.$TURN already exists"
|
||||
else
|
||||
mv orders.dir orders.dir.$TURN
|
||||
mkdir -p orders.dir
|
||||
fi
|
||||
ls -1rt orders.dir.$TURN/turn-* | xargs cat > orders.$TURN
|
|
@ -12,14 +12,15 @@ if [ -d $REPORTS ]; then
|
|||
rm -rf $REPORTS
|
||||
fi
|
||||
mkdir $REPORTS
|
||||
$BIN/backup-eressea $GAME $TURN
|
||||
|
||||
cd $ERESSEA/game-$GAME
|
||||
if [ -d test ]; then
|
||||
touch test/execute.lock
|
||||
fi
|
||||
$BIN/create-orders $GAME $TURN
|
||||
$BIN/backup-eressea $GAME $TURN
|
||||
rm -f execute.lock
|
||||
$BIN/run-turn $GAME
|
||||
$BIN/run-turn $GAME $TURN
|
||||
touch execute.lock
|
||||
|
||||
if [ ! -s $ERESSEA/game-$GAME/orders.$TURN ]; then
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
GAME=$1
|
||||
TURN=$2
|
||||
|
||||
if [ ! -d $ERESSEA/game-$GAME ] ; then
|
||||
echo "No such game: $GAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $ERESSEA/game-$GAME
|
||||
|
||||
echo "running turn $TURN, game $GAME"
|
||||
$ERESSEA/server/bin/eressea -v1 -t $TURN run-turn.lua
|
||||
mkdir -p log
|
||||
ln -f eressea.log log/eressea.log.$TURN
|
|
@ -1,3 +1,3 @@
|
|||
#define VERSION_MAJOR 3
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_BUILD 694
|
||||
#define VERSION_BUILD 695
|
||||
|
|
|
@ -274,9 +274,7 @@ unit *addplayer(region * r, faction * f)
|
|||
|
||||
bool checkpasswd(const faction * f, const char *passwd, bool shortp)
|
||||
{
|
||||
if (unicode_utf8_strcasecmp(f->passw, passwd) == 0)
|
||||
return true;
|
||||
return false;
|
||||
return (passwd && unicode_utf8_strcasecmp(f->passw, passwd) == 0);
|
||||
}
|
||||
|
||||
variant read_faction_reference(struct storage * store)
|
||||
|
|
Loading…
Reference in New Issue