Bug 3570 - Report player guid in log file
Status: RESOLVED FIXED
Alias:
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: All All
: P3 enhancement
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2008-03-16 06:16 EDT by Guillaume Bougard
Modified: 2011-02-04 12:53:57 EST
1 user (show)

See Also:



Description Guillaume Bougard 2008-03-16 06:16:56 EDT
ioq3 has guid support but it seems only be used in some mod for admin purpose.

But it could also be useful for server statictics purpose to retrieve the player GUID.
I know VSP could handle GUID but not for Q3 at that time. That product is quite dead now and I will try to produce a dedicated parser for westernq3/Smokin'Guns mod with GUID support (maybe I could also release an updated Q3 parser) as I still proposed a patch for their next SA release (see http://www.smokin-guns.net/main/viewtopic.php?p=8940).

Here is the proposed patch upon trunk rev1271 (but concerned file is rev1204):
--- g_client.c.no_guid  2008-03-14 12:15:49.000000000 +0100
+++ g_client.c  2008-03-14 12:17:11.000000000 +0100
@@ -713,6 +713,7 @@
        char    redTeam[MAX_INFO_STRING];
        char    blueTeam[MAX_INFO_STRING];
        char    userinfo[MAX_INFO_STRING];
+       char    guid[MAX_INFO_STRING];
 
        ent = g_entities + clientNum;
        client = ent->client;
@@ -863,6 +864,7 @@
 
        strcpy(redTeam, Info_ValueForKey( userinfo, "g_redteam" ));
        strcpy(blueTeam, Info_ValueForKey( userinfo, "g_blueteam" ));
+       strcpy(guid, Info_ValueForKey( userinfo, "cl_guid" ));
 
        // send over a subset of the userinfo keys so other clients can
        // print scoreboards, display models, and play custom sounds
@@ -871,10 +873,14 @@
                        client->pers.netname, team, model, headModel, c1, c2,
                        client->pers.maxHealth, client->sess.wins, client->sess.losses,
                        Info_ValueForKey( userinfo, "skill" ), teamTask, teamLeader );
-       } else {
+       } else if (*guid == 0) {
                s = va("n\\%s\\t\\%i\\model\\%s\\hmodel\\%s\\g_redteam\\%s\\g_blueteam\\%s\\c1\\%s\\c2\\%s\\hc\\%i\\w\\%i\\l\\%i\\tt\\%d\\tl\\%d",
                        client->pers.netname, client->sess.sessionTeam, model, headModel, redTeam, blueTeam, c1, c2,
                        client->pers.maxHealth, client->sess.wins, client->sess.losses, teamTask, teamLeader);
+       } else {
+               s = va("guid\\%s\\n\\%s\\t\\%i\\model\\%s\\hmodel\\%s\\g_redteam\\%s\\g_blueteam\\%s\\c1\\%s\\c2\\%s\\hc\\%i\\w\\%i\\l\\%i\\tt\\%d\\tl\\%d",
+                       guid, client->pers.netname, client->sess.sessionTeam, model, headModel, redTeam, blueTeam, c1, c2,
+                       client->pers.maxHealth, client->sess.wins, client->sess.losses, teamTask, teamLeader);
        }
 
        trap_SetConfigstring( CS_PLAYERS+clientNum, s );
Comment 1 Thilo Schulz 2009-10-08 19:02:00 EDT
Added it to the client userinfo string, though at a different more fitting position and i don't handle the special case when there's no guid. See rev. 1653
Comment 2 Thilo Schulz 2011-02-04 12:53:57 EST
I had to remove your patch because this will make the guid be transmitted to all players on the server. You can thus forget cl_guid based authentication. If you want to support stat tools, please find another way and resubmit a patch.