From 394d3bb66f29e70a65ef72ec863d807193ffcc48 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 31 Mar 2002 14:06:12 +0000 Subject: [PATCH] =?UTF-8?q?FFL=5FOVERRIDE=20nur=20setzen,=20wenn=20auch=20?= =?UTF-8?q?passwort=20ge=C3=A4ndert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/gamecode/laws.c | 1 + src/common/kernel/faction.c | 7 ++----- src/common/kernel/faction.h | 2 +- src/eressea/main.c | 2 ++ 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 88a8ccc3e..c900468b7 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -2068,6 +2068,7 @@ set_passw(void) } } set_string(&u->faction->passw, pbuf); + fset(f, FFL_OVERRIDE); ADDMSG(&u->faction->msgs, msg_message("changepasswd", "value", gc_add(strdup(u->faction->passw)))); } diff --git a/src/common/kernel/faction.c b/src/common/kernel/faction.c index d5d60edc9..b446da2b5 100644 --- a/src/common/kernel/faction.c +++ b/src/common/kernel/faction.c @@ -136,12 +136,9 @@ addplayer(region *r, const char *email, const struct race * frace, const locale } boolean -checkpasswd(faction * f, const char * passwd) +checkpasswd(const faction * f, const char * passwd) { if (strcasecmp(f->passw, passwd)==0) return true; - if (strcasecmp(f->override, passwd)==0) { - fset(f, FFL_OVERRIDE); - return true; - } + if (strcasecmp(f->override, passwd)==0) return true; return false; } diff --git a/src/common/kernel/faction.h b/src/common/kernel/faction.h index 69c44c136..e443fed5a 100644 --- a/src/common/kernel/faction.h +++ b/src/common/kernel/faction.h @@ -80,6 +80,6 @@ extern const struct unit * random_unit_in_faction(const struct faction *f); extern const char * factionname(const struct faction * f); extern void * resolve_faction(void * data); extern struct unit * addplayer(struct region *r, const char *email, const struct race * frace, const struct locale *loc); -extern boolean checkpasswd(faction * f, const char * passwd); +extern boolean checkpasswd(const faction * f, const char * passwd); #endif diff --git a/src/eressea/main.c b/src/eressea/main.c index 344da2b93..60a3fe324 100644 --- a/src/eressea/main.c +++ b/src/eressea/main.c @@ -208,6 +208,7 @@ getgarbage(void) #endif } +#if 0 static void writefactiondata(void) { @@ -233,6 +234,7 @@ writefactiondata(void) } fclose(F); } +#endif static void writepasswd(void)