]> git.pond.sub.org Git - empserver/commitdiff
(player): Rename member validated to authenticated.
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 22 Feb 2006 19:20:41 +0000 (19:20 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 22 Feb 2006 19:20:41 +0000 (19:20 +0000)
include/player.h
src/lib/player/login.c

index 36a178441b1b8d6362895bf340f50284e1480247..6415e90f0508d679089c3b2bbb9a72a2f607c369 100644 (file)
@@ -51,7 +51,7 @@ struct player {
     char hostname[512];                /* may be empty */
     char client[128];          /* may be empty */
     char userid[32];           /* may be empty */
-    int validated;
+    int authenticated;
     natid cnum;
     int state;
     int flags;
index 280c3543f1224a59ee17af8dcd0da09eb427c62f..e62c3e1938536535499b85de661778c381e220ad 100644 (file)
@@ -180,7 +180,7 @@ coun_cmd(void)
        return RET_FAIL;
     }
     player->cnum = cnum;
-    player->validated = 0;
+    player->authenticated = 0;
     pr_id(player, C_CMDOK, "country name %s\n", player->argp[1]);
     return 0;
 }
@@ -200,7 +200,7 @@ pass_cmd(void)
                 praddr(player), player->cnum, player->argp[1]);
        return RET_FAIL;
     }
-    player->validated++;
+    player->authenticated = 1;
     pr_id(player, C_CMDOK, "password ok\n");
     logerror("%s using country #%d", praddr(player), player->cnum);
     return RET_OK;
@@ -269,7 +269,7 @@ play_cmd(void)
     if (*++ap) {
        strncpy(player->userid, *ap, sizeof(player->userid) - 1);
        player->userid[sizeof(player->userid) - 1] = '\0';
-       player->validated = 0;
+       player->authenticated = 0;
     }
     if (*++ap) {
        if (natbyname(*ap, &cnum) < 0) {
@@ -285,9 +285,9 @@ play_cmd(void)
            return RET_FAIL;
        }
        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");
        return RET_FAIL;
     }
@@ -321,7 +321,7 @@ kill_cmd(void)
     struct player *other;
     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");
        return RET_FAIL;
     }