]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
only load the null model ONCE
[xonotic/darkplaces.git] / host_cmd.c
index d700349bdcf014443ec07c5edab7da3d4c654aa7..b80cf5638085f0632361ad9d8784379c0179a934 100644 (file)
@@ -136,7 +136,7 @@ void Host_Status_f (void)
                if(sv_status_privacy.integer && cmd_source != src_command)
                        strlcpy(ip, client->netconnection ? "hidden" : "botclient" , 22);
                else
-                       strlcpy(ip, client->netconnection->address ? client->netconnection->address : "botclient", 22);
+                       strlcpy(ip, (client->netconnection && client->netconnection->address) ? client->netconnection->address : "botclient", 22);
                
                if (in == 0) // default layout
                {
@@ -530,7 +530,7 @@ void Host_Savegame_to (const char *name)
        // convert space to _ to make stdio happy
        // LordHavoc: convert control characters to _ as well
        for (i=0 ; i<SAVEGAME_COMMENT_LENGTH ; i++)
-               if (comment[i] <= ' ')
+               if (ISWHITESPACEORCONTROL(comment[i]))
                        comment[i] = '_';
        comment[SAVEGAME_COMMENT_LENGTH] = '\0';
 
@@ -1035,7 +1035,7 @@ void Host_Name_f (void)
        if (strcmp(host_client->old_name, host_client->name))
        {
                if (host_client->spawned)
-                       SV_BroadcastPrintf("%s changed name to %s\n", host_client->old_name, host_client->name);
+                       SV_BroadcastPrintf("%s ^7changed name to %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);
@@ -2317,7 +2317,7 @@ void Host_Rcon_f (void) // credit: taken from QuakeWorld
 
        for (i = 0;rcon_password.string[i];i++)
        {
-               if (rcon_password.string[i] <= ' ')
+               if (ISWHITESPACE(rcon_password.string[i]))
                {
                        Con_Printf("rcon_password is not allowed to have any whitespace.\n");
                        return;