diff --git a/sv_ccmds.c b/sv_ccmds.c index fa776ae55..64b3d1977 100644 --- a/sv_ccmds.c +++ b/sv_ccmds.c @@ -870,7 +870,7 @@ void SV_Name(int clientnum) PRVM_serveredictstring(host_client->edict, netname) = PRVM_SetEngineString(prog, host_client->name); if (strcmp(host_client->old_name, host_client->name)) { - if (host_client->begun) + if (host_client->begun && host_client->netconnection) SV_BroadcastPrintf("\003%s ^7changed name to ^3%s\n", host_client->old_name, host_client->name); dp_strlcpy(host_client->old_name, host_client->name, sizeof(host_client->old_name)); // send notification to all clients diff --git a/sv_main.c b/sv_main.c index 1ef85e708..7d5c45ad9 100644 --- a/sv_main.c +++ b/sv_main.c @@ -1085,11 +1085,12 @@ void SV_DropClient(qbool leaving, const char *fmt, ... ) // break the net connection NetConn_Close(host_client->netconnection); host_client->netconnection = NULL; + + if(fmt) + SV_BroadcastPrintf("\003^3%s left the game (%s)\n", host_client->name, reason); + else + SV_BroadcastPrintf("\003^3%s left the game\n", host_client->name); } - if(fmt) - SV_BroadcastPrintf("\003^3%s left the game (%s)\n", host_client->name, reason); - else - SV_BroadcastPrintf("\003^3%s left the game\n", host_client->name); // if a download is active, close it if (host_client->download_file) @@ -2573,7 +2574,7 @@ double SV_Frame(double time) } if (sv.perf_lost > 0 && reporting) - SV_BroadcastPrintf("\003" CON_WARN "Server lag report: %s\n", SV_TimingReport(vabuf, sizeof(vabuf))); + SV_BroadcastPrintf(CON_WARN "Server lag report: %s\n", SV_TimingReport(vabuf, sizeof(vabuf))); sv.perf_acc_realtime = sv.perf_acc_sleeptime = sv.perf_acc_lost = sv.perf_acc_offset =