+void SV_Name(int clientnum)
+{
+ prvm_prog_t *prog = SVVM_prog;
+ 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)
+ SV_BroadcastPrintf("\003%s ^7changed name to ^3%s\n", host_client->old_name, host_client->name);
+ strlcpy(host_client->old_name, host_client->name, sizeof(host_client->old_name));
+ // send notification to all clients
+ MSG_WriteByte (&sv.reliable_datagram, svc_updatename);
+ MSG_WriteByte (&sv.reliable_datagram, clientnum);
+ MSG_WriteString (&sv.reliable_datagram, host_client->name);
+ SV_WriteNetnameIntoDemo(host_client);
+ }
+}
+