FFL_OVERRIDE nur setzen, wenn auch passwort geändert.

This commit is contained in:
Enno Rehling 2002-03-31 14:06:12 +00:00
parent 665bd04808
commit 394d3bb66f
4 changed files with 6 additions and 6 deletions

View File

@ -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))));
}

View File

@ -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;
}

View File

@ -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

View File

@ -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)