]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
Fix NULL in pause command.
[xonotic/darkplaces.git] / host_cmd.c
index e2b8123ecba76b18a32d70d94bb9b06431702aa1..754672515a027bae1f9eb8a0a45c9b2f33e5e203 100644 (file)
@@ -1793,7 +1793,12 @@ static void Host_Pause_f (void)
        }
        
        sv.paused ^= 1;
-       SV_BroadcastPrintf("%s %spaused the game\n", host_client->name, sv.paused ? "" : "un");
+       if (cmd_source != src_command)
+               SV_BroadcastPrintf("%s %spaused the game\n", host_client->name, sv.paused ? "" : "un");
+       else if(*(sv_adminnick.string))
+               SV_BroadcastPrintf("%s %spaused the game\n", sv_adminnick.string, sv.paused ? "" : "un");
+       else
+               SV_BroadcastPrintf("%s %spaused the game\n", hostname.string, sv.paused ? "" : "un");
        // send notification to all clients
        MSG_WriteByte(&sv.reliable_datagram, svc_setpause);
        MSG_WriteByte(&sv.reliable_datagram, sv.paused);