X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=netconn.c;h=4ff6a57637f3d9866f92796b1db9e7ade94508f1;hb=49e68945aaf75a9ead362b814b6452783c414a3e;hp=0bc22f11fc01a2315b5df2ab36edd727c874e770;hpb=4223c283a73c5f2774a6e01515246dfc511889b7;p=xonotic%2Fdarkplaces.git diff --git a/netconn.c b/netconn.c index 0bc22f11..4ff6a576 100644 --- 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(); } }