(player): Rename member validated to authenticated.
This commit is contained in:
parent
2147583a9e
commit
504305357d
2 changed files with 7 additions and 7 deletions
|
@ -51,7 +51,7 @@ struct player {
|
||||||
char hostname[512]; /* may be empty */
|
char hostname[512]; /* may be empty */
|
||||||
char client[128]; /* may be empty */
|
char client[128]; /* may be empty */
|
||||||
char userid[32]; /* may be empty */
|
char userid[32]; /* may be empty */
|
||||||
int validated;
|
int authenticated;
|
||||||
natid cnum;
|
natid cnum;
|
||||||
int state;
|
int state;
|
||||||
int flags;
|
int flags;
|
||||||
|
|
|
@ -180,7 +180,7 @@ coun_cmd(void)
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
player->cnum = cnum;
|
player->cnum = cnum;
|
||||||
player->validated = 0;
|
player->authenticated = 0;
|
||||||
pr_id(player, C_CMDOK, "country name %s\n", player->argp[1]);
|
pr_id(player, C_CMDOK, "country name %s\n", player->argp[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ pass_cmd(void)
|
||||||
praddr(player), player->cnum, player->argp[1]);
|
praddr(player), player->cnum, player->argp[1]);
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
player->validated++;
|
player->authenticated = 1;
|
||||||
pr_id(player, C_CMDOK, "password ok\n");
|
pr_id(player, C_CMDOK, "password ok\n");
|
||||||
logerror("%s using country #%d", praddr(player), player->cnum);
|
logerror("%s using country #%d", praddr(player), player->cnum);
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
|
@ -269,7 +269,7 @@ play_cmd(void)
|
||||||
if (*++ap) {
|
if (*++ap) {
|
||||||
strncpy(player->userid, *ap, sizeof(player->userid) - 1);
|
strncpy(player->userid, *ap, sizeof(player->userid) - 1);
|
||||||
player->userid[sizeof(player->userid) - 1] = '\0';
|
player->userid[sizeof(player->userid) - 1] = '\0';
|
||||||
player->validated = 0;
|
player->authenticated = 0;
|
||||||
}
|
}
|
||||||
if (*++ap) {
|
if (*++ap) {
|
||||||
if (natbyname(*ap, &cnum) < 0) {
|
if (natbyname(*ap, &cnum) < 0) {
|
||||||
|
@ -285,9 +285,9 @@ play_cmd(void)
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
player->cnum = cnum;
|
player->cnum = cnum;
|
||||||
player->validated++;
|
player->authenticated = 1;
|
||||||
}
|
}
|
||||||
if (player->cnum == 255 || !player->validated) {
|
if (player->cnum == 255 || !player->authenticated) {
|
||||||
pr_id(player, C_CMDERR, "need country and password\n");
|
pr_id(player, C_CMDERR, "need country and password\n");
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ kill_cmd(void)
|
||||||
struct player *other;
|
struct player *other;
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
|
|
||||||
if (player->cnum == 255 || !player->validated) {
|
if (player->cnum == 255 || !player->authenticated) {
|
||||||
pr_id(player, C_CMDERR, "need country and password\n");
|
pr_id(player, C_CMDERR, "need country and password\n");
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue