// update description strings for engine menu and console output
entry->line1_len = dpsnprintf(entry->line1, sizeof(serverlist_cache[n].line1), "^%c%5.0f^7 ^%c%3u^7/%3u %-65.65s",
info->ping >= 300 ? '1' : (info->ping >= 200 ? '3' : '7'),
- info->ping ?: INFINITY, // display inf when a listed server times out and net_slist_pause blocks its removal
+ info->ping ? info->ping : INFINITY, // display inf when a listed server times out and net_slist_pause blocks its removal
((info->numhumans > 0 && info->numhumans < info->maxplayers) ? (info->numhumans >= 4 ? '7' : '3') : '1'),
info->numplayers,
info->maxplayers,
while((userpass_end = strchr(userpass_start, ' ')))
{
have_usernames = true;
- dp_strlcpy(buf, userpass_start, ((size_t)(userpass_end-userpass_start) >= sizeof(buf)) ? (int)(sizeof(buf)) : (int)(userpass_end-userpass_start+1));
+ dp_ustr2stp(buf, sizeof(buf), userpass_start, userpass_end - userpass_start);
if(buf[0]) // Ignore empty entries due to leading/duplicate space.
if(comparator(peeraddress, buf, password, cs, cslen))
goto allow;
while((userpass_end = strchr(userpass_start, ' ')))
{
have_usernames = true;
- dp_strlcpy(buf, userpass_start, ((size_t)(userpass_end-userpass_start) >= sizeof(buf)) ? (int)(sizeof(buf)) : (int)(userpass_end-userpass_start+1));
+ dp_ustr2stp(buf, sizeof(buf), userpass_start, userpass_end - userpass_start);
if(buf[0]) // Ignore empty entries due to leading/duplicate space.
if(comparator(peeraddress, buf, password, cs, cslen))
goto check;
if(l)
{
client_t *host_client_save = host_client;
- //Cmd_ExecuteString(cmd_local, s, src_local, true); // no variable expansion
- // bones_was_here: prepending allows a loop such as `alias foo "bar; wait; foo"; foo`
- // to be broken with an alias or unalias command
- Cbuf_InsertText(cmd_local, s);
+ Cmd_PreprocessAndExecuteString(cmd_local, s, l, src_local, true);
host_client = host_client_save;
// in case it is a command that changes host_client (like restart)
}
}
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();
}
}
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)