]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - netconn.c
sys: work around incomplete POSIX support in MacOS
[xonotic/darkplaces.git] / netconn.c
index b4dc5d5047afa454759d760846b0b854d11f7960..4ff6a57637f3d9866f92796b1db9e7ade94508f1 100644 (file)
--- a/netconn.c
+++ b/netconn.c
@@ -3132,7 +3132,10 @@ static void RCon_Execute(lhnetsocket_t *mysocket, lhnetaddress_t *peeraddress, c
        }
        else
        {
-               Con_Printf("server denied rcon access to %s\n", host_client ? host_client->name : addressstring2);
+               if (!host_client || !host_client->netconnection || LHNETADDRESS_GetAddressType(&host_client->netconnection->peeraddress) != LHNETADDRESSTYPE_LOOP)
+                       Con_Rcon_Redirect_Init(mysocket, peeraddress, proquakeprotocol);
+               Con_Printf(CON_ERROR "server denied rcon access to %s\n", host_client ? host_client->name : addressstring2);
+               Con_Rcon_Redirect_End();
        }
 }
 
@@ -3677,7 +3680,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                LHNETADDRESS_ToString(LHNET_AddressFromSocket(mysocket), myaddressstring, sizeof(myaddressstring), true);
                                MSG_WriteString(&sv_message, myaddressstring);
                                MSG_WriteString(&sv_message, hostname.string);
-                               MSG_WriteString(&sv_message, sv.name);
+                               MSG_WriteString(&sv_message, sv.worldbasename);
                                // How many clients are there?
                                for (i = 0, numclients = 0;i < svs.maxclients;i++)
                                        if (svs.clients[i].active)