From 692aee03b6b5ce0e7dce4c910d572137b3a00030 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Tue, 27 Feb 2024 00:55:11 +1000 Subject: [PATCH] rcon: return the error message when authentication fails Signed-off-by: bones_was_here --- netconn.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } } -- 2.39.2