#include "constants.qh"
#include "util.qh"
#include <common/weapons/_all.qh>
+ #include <server/client.qh>
#include "../server/anticheat.qh"
- #include "../server/defs.qh"
+ #include <common/stats.qh>
+ #include <server/intermission.qh>
#include "../server/scores.qh"
+ #include <server/world.qh>
#include "../server/weapons/accuracy.qh"
#endif
db_put(PS_GR_OUT_DB, sprintf("%s:_playerid", p.playerstats_id), ftos(p.playerid));
if(CS(p).cvar_cl_allow_uid2name == 1 || IS_BOT_CLIENT(p))
- db_put(PS_GR_OUT_DB, sprintf("%s:_netname", p.playerstats_id), playername(p, false));
+ db_put(PS_GR_OUT_DB, sprintf("%s:_netname", p.playerstats_id), playername(p.netname, p.team, false));
if(teamplay)
db_put(PS_GR_OUT_DB, sprintf("%s:_team", p.playerstats_id), ftos(p.team));
* G: game type
* O: mod name (icon request) as in server browser
* M: map name
- * I: match ID (see "matchid" in g_world.qc)
+ * I: match ID (see "matchid" in world.qc)
* S: "hostname" of the server
* C: number of "unpure" cvar changes
* U: UDP port number of the server
{
// url_fclose is processing, we got a response for writing the data
// this must come from HTTP
- LOG_TRACE("Got response from player stats server:");
- while((s = url_fgets(fh))) { LOG_TRACE(" ", s); }
- LOG_TRACE("End of response.");
+ LOG_DEBUG("Got response from player stats server:");
+ while((s = url_fgets(fh))) { LOG_DEBUG(" ", s); }
+ LOG_DEBUG("End of response.");
url_fclose(fh);
break;
}
case URL_READY_CLOSED:
{
// url_fclose has finished
- LOG_TRACE("Player stats written");
+ LOG_DEBUG("Player stats written");
PlayerStats_GameReport_DelayMapVote = false;
if(PS_GR_OUT_DB >= 0)
{
// now request the information
uri = strcat(uri, "/player/", uri_escape(uri_escape(uri_escape(joiningplayer.crypto_idfp))), "/elo.txt");
- LOG_TRACE("Retrieving playerstats from URL: ", uri);
+ LOG_DEBUG("Retrieving playerstats from URL: ", uri);
url_single_fopen(
uri,
FILE_APPEND,
{
// determine whether we should retrieve playerbasic information again
- LOG_TRACEF("PlayerStats_PlayerBasic_CheckUpdate('%s'): %f",
+ LOG_DEBUGF("PlayerStats_PlayerBasic_CheckUpdate('%s'): %f",
joiningplayer.netname,
time
);
{
case URL_READY_CANWRITE:
{
- LOG_TRACE("-- Sending data to player stats server");
+ LOG_DEBUG("-- Sending data to player stats server");
/*url_fputs(fh, "V 1\n");
#ifdef WATERMARK
url_fputs(fh, sprintf("R %s\n", WATERMARK));
gt = data;
break;
case "e":
- LOG_TRACE("G: ", gt);
- LOG_TRACE("e: ", data);
+ //LOG_TRACE("G: ", gt);
+ //LOG_TRACE("e: ", data);
if (gt == PlayerStats_GetGametype()) {
handled = true;
float e = stof(data);
// now actually set the event data
db_put(PS_D_IN_DB, sprintf("#%s", event), data);
- LOG_TRACE("Added item ", sprintf("#%s", event), "=", data, " to PS_D_IN_DB");
+ LOG_DEBUG("Added item ", sprintf("#%s", event), "=", data, " to PS_D_IN_DB");
}
void PlayerStats_PlayerDetail()
PS_D_IN_DB = db_create();
//uri = strcat(uri, "/player/", uri_escape(crypto_getmyidfp(0)));
- LOG_TRACE("Retrieving playerstats from URL: ", autocvar_g_playerstats_playerdetail_uri);
+ LOG_DEBUG("Retrieving playerstats from URL: ", autocvar_g_playerstats_playerdetail_uri);
url_single_fopen(
autocvar_g_playerstats_playerdetail_uri,
FILE_APPEND,
{
case URL_READY_CANWRITE:
{
- LOG_TRACE("PlayerStats_PlayerDetail_Handler(): Sending data to player stats server...");
+ LOG_DEBUG("PlayerStats_PlayerDetail_Handler(): Sending data to player stats server...");
url_fputs(fh, "V 1\n");
#ifdef WATERMARK
url_fputs(fh, sprintf("R %s\n", WATERMARK));