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)