forked from github/server
FFL_OVERRIDE nur setzen, wenn auch passwort geändert.
This commit is contained in:
parent
665bd04808
commit
394d3bb66f
|
@ -2068,6 +2068,7 @@ set_passw(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set_string(&u->faction->passw, pbuf);
|
set_string(&u->faction->passw, pbuf);
|
||||||
|
fset(f, FFL_OVERRIDE);
|
||||||
ADDMSG(&u->faction->msgs, msg_message("changepasswd",
|
ADDMSG(&u->faction->msgs, msg_message("changepasswd",
|
||||||
"value", gc_add(strdup(u->faction->passw))));
|
"value", gc_add(strdup(u->faction->passw))));
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,12 +136,9 @@ addplayer(region *r, const char *email, const struct race * frace, const locale
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
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->passw, passwd)==0) return true;
|
||||||
if (strcasecmp(f->override, passwd)==0) {
|
if (strcasecmp(f->override, passwd)==0) return true;
|
||||||
fset(f, FFL_OVERRIDE);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 const char * factionname(const struct faction * f);
|
||||||
extern void * resolve_faction(void * data);
|
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 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
|
#endif
|
||||||
|
|
|
@ -208,6 +208,7 @@ getgarbage(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void
|
static void
|
||||||
writefactiondata(void)
|
writefactiondata(void)
|
||||||
{
|
{
|
||||||
|
@ -233,6 +234,7 @@ writefactiondata(void)
|
||||||
}
|
}
|
||||||
fclose(F);
|
fclose(F);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
writepasswd(void)
|
writepasswd(void)
|
||||||
|
|
Loading…
Reference in New Issue