From: bones_was_here Date: Mon, 26 Feb 2024 14:55:11 +0000 (+1000) Subject: rcon: return the error message when authentication fails X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=692aee03b6b5ce0e7dce4c910d572137b3a00030;p=xonotic%2Fdarkplaces.git rcon: return the error message when authentication fails Signed-off-by: bones_was_here --- 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(); } }