2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include "prvm_cmds.h"
28 // for secure rcon authentication
33 extern cvar_t sv_adminnick;
34 extern cvar_t sv_status_privacy;
35 extern cvar_t sv_status_show_qcstatus;
36 extern cvar_t sv_namechangetimer;
37 cvar_t rcon_password = {CVAR_CLIENT | CVAR_SERVER | CVAR_PRIVATE, "rcon_password", "", "password to authenticate rcon commands; NOTE: changing rcon_secure clears rcon_password, so set rcon_secure always before rcon_password; may be set to a string of the form user1:pass1 user2:pass2 user3:pass3 to allow multiple user accounts - the client then has to specify ONE of these combinations"};
38 cvar_t rcon_secure = {CVAR_CLIENT | CVAR_SERVER, "rcon_secure", "0", "force secure rcon authentication (1 = time based, 2 = challenge based); NOTE: changing rcon_secure clears rcon_password, so set rcon_secure always before rcon_password"};
39 cvar_t rcon_secure_challengetimeout = {CVAR_CLIENT, "rcon_secure_challengetimeout", "5", "challenge-based secure rcon: time out requests if no challenge came within this time interval"};
40 cvar_t rcon_address = {CVAR_CLIENT, "rcon_address", "", "server address to send rcon commands to (when not connected to a server)"};
41 cvar_t cl_name = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "name", "player", "change your player name"};
42 cvar_t cl_topcolor = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "topcolor", "0", "change the color of your shirt"};
43 cvar_t cl_bottomcolor = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "bottomcolor", "0", "change the color of your pants"};
44 cvar_t cl_team = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "team", "none", "QW team (4 character limit, example: blue)"};
45 cvar_t cl_skin = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "skin", "", "QW player skin name (example: base)"};
46 cvar_t cl_playermodel = {CVAR_CLIENT | CVAR_SERVER | CVAR_USERINFO | CVAR_SAVE, "playermodel", "", "current player model in Nexuiz/Xonotic"};
47 cvar_t cl_playerskin = {CVAR_CLIENT | CVAR_SERVER | CVAR_USERINFO | CVAR_SAVE, "playerskin", "", "current player skin in Nexuiz/Xonotic"};
48 cvar_t cl_noaim = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "noaim", "1", "QW option to disable vertical autoaim"};
49 cvar_t cl_pmodel = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "pmodel", "0", "current player model number in nehahra"};
50 cvar_t r_fixtrans_auto = {CVAR_CLIENT, "r_fixtrans_auto", "0", "automatically fixtrans textures (when set to 2, it also saves the fixed versions to a fixtrans directory)"};
52 //============================================================================
55 ======================
57 ======================
59 // the old cl_playermodel in cl_main has been renamed to __cl_playermodel
60 static void CL_Playermodel_f(cmd_state_t *cmd)
62 prvm_prog_t *prog = SVVM_prog;
64 char newPath[sizeof(host_client->playermodel)];
66 if (Cmd_Argc (cmd) == 1)
68 if (cmd->source == src_command)
70 Con_Printf("\"playermodel\" is \"%s\"\n", cl_playermodel.string);
75 if (Cmd_Argc (cmd) == 2)
76 strlcpy (newPath, Cmd_Argv(cmd, 1), sizeof (newPath));
78 strlcpy (newPath, Cmd_Args(cmd), sizeof (newPath));
80 for (i = 0, j = 0;newPath[i];i++)
81 if (newPath[i] != '\r' && newPath[i] != '\n')
82 newPath[j++] = newPath[i];
85 if (cmd->source == src_command)
87 Cvar_Set (&cvars_all, "_cl_playermodel", newPath);
92 if (host.realtime < host_client->nametime)
94 SV_ClientPrintf("You can't change playermodel more than once every 5 seconds!\n");
98 host_client->nametime = host.realtime + 5;
101 // point the string back at updateclient->name to keep it safe
102 strlcpy (host_client->playermodel, newPath, sizeof (host_client->playermodel));
103 PRVM_serveredictstring(host_client->edict, playermodel) = PRVM_SetEngineString(prog, host_client->playermodel);
104 if (strcmp(host_client->old_model, host_client->playermodel))
106 strlcpy(host_client->old_model, host_client->playermodel, sizeof(host_client->old_model));
107 /*// send notification to all clients
108 MSG_WriteByte (&sv.reliable_datagram, svc_updatepmodel);
109 MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
110 MSG_WriteString (&sv.reliable_datagram, host_client->playermodel);*/
115 ======================
117 ======================
119 static void CL_Playerskin_f(cmd_state_t *cmd)
121 prvm_prog_t *prog = SVVM_prog;
123 char newPath[sizeof(host_client->playerskin)];
125 if (Cmd_Argc (cmd) == 1)
127 if (cmd->source == src_command)
129 Con_Printf("\"playerskin\" is \"%s\"\n", cl_playerskin.string);
134 if (Cmd_Argc (cmd) == 2)
135 strlcpy (newPath, Cmd_Argv(cmd, 1), sizeof (newPath));
137 strlcpy (newPath, Cmd_Args(cmd), sizeof (newPath));
139 for (i = 0, j = 0;newPath[i];i++)
140 if (newPath[i] != '\r' && newPath[i] != '\n')
141 newPath[j++] = newPath[i];
144 if (cmd->source == src_command)
146 Cvar_Set (&cvars_all, "_cl_playerskin", newPath);
151 if (host.realtime < host_client->nametime)
153 SV_ClientPrintf("You can't change playermodel more than once every 5 seconds!\n");
157 host_client->nametime = host.realtime + 5;
160 // point the string back at updateclient->name to keep it safe
161 strlcpy (host_client->playerskin, newPath, sizeof (host_client->playerskin));
162 PRVM_serveredictstring(host_client->edict, playerskin) = PRVM_SetEngineString(prog, host_client->playerskin);
163 if (strcmp(host_client->old_skin, host_client->playerskin))
165 //if (host_client->begun)
166 // SV_BroadcastPrintf("%s changed skin to %s\n", host_client->name, host_client->playerskin);
167 strlcpy(host_client->old_skin, host_client->playerskin, sizeof(host_client->old_skin));
168 /*// send notification to all clients
169 MSG_WriteByte (&sv.reliable_datagram, svc_updatepskin);
170 MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
171 MSG_WriteString (&sv.reliable_datagram, host_client->playerskin);*/
180 cvar_t cl_color = {CVAR_READONLY | CVAR_CLIENT | CVAR_SAVE, "_cl_color", "0", "internal storage cvar for current player colors (changed by color command)"};
182 // Ignore the callbacks so this two-to-three way synchronization doesn't cause an infinite loop.
183 static void CL_Color_c(cvar_t *var)
187 Cvar_Set_NoCallback(&cl_topcolor, va(vabuf, sizeof(vabuf), "%i", ((var->integer >> 4) & 15)));
188 Cvar_Set_NoCallback(&cl_bottomcolor, va(vabuf, sizeof(vabuf), "%i", (var->integer & 15)));
191 static void CL_Topcolor_c(cvar_t *var)
195 Cvar_Set_NoCallback(&cl_color, va(vabuf, sizeof(vabuf), "%i", var->integer*16 + cl_bottomcolor.integer));
198 static void CL_Bottomcolor_c(cvar_t *var)
202 Cvar_Set_NoCallback(&cl_color, va(vabuf, sizeof(vabuf), "%i", cl_topcolor.integer*16 + var->integer));
205 static void CL_Color_f(cmd_state_t *cmd)
209 if (Cmd_Argc(cmd) == 1)
211 if (cmd->source == src_command)
213 Con_Printf("\"color\" is \"%i %i\"\n", cl_topcolor.integer, cl_bottomcolor.integer);
214 Con_Print("color <0-15> [0-15]\n");
219 if (Cmd_Argc(cmd) == 2)
220 top = bottom = atoi(Cmd_Argv(cmd, 1));
223 top = atoi(Cmd_Argv(cmd, 1));
224 bottom = atoi(Cmd_Argv(cmd, 2));
227 * This is just a convenient way to change topcolor and bottomcolor
228 * We can't change cl_color from here directly because topcolor and
229 * bottomcolor may be changed separately and do not call this function.
230 * So it has to be changed when the userinfo strings are updated, which
231 * happens twice here. Perhaps find a cleaner way?
234 top = top >= 0 ? top : cl_topcolor.integer;
235 bottom = bottom >= 0 ? bottom : cl_bottomcolor.integer;
240 // LadyHavoc: allowing skin colormaps 14 and 15 by commenting this out
246 if (cmd->source == src_command)
248 Cvar_SetValueQuick(&cl_topcolor, top);
249 Cvar_SetValueQuick(&cl_bottomcolor, bottom);
254 cvar_t cl_rate = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "rate", "20000", "change your connection speed"};
255 cvar_t cl_rate_burstsize = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "rate_burstsize", "1024", "internal storage cvar for current rate control burst size (changed by rate_burstsize command)"};
258 ======================
260 LadyHavoc: only supported for Nehahra, I personally think this is dumb, but Mindcrime won't listen.
261 LadyHavoc: correction, Mindcrime will be removing pmodel in the future, but it's still stuck here for compatibility.
262 ======================
264 static void CL_PModel_f(cmd_state_t *cmd)
266 prvm_prog_t *prog = SVVM_prog;
269 if (Cmd_Argc (cmd) == 1)
271 if (cmd->source == src_command)
273 Con_Printf("\"pmodel\" is \"%s\"\n", cl_pmodel.string);
277 i = atoi(Cmd_Argv(cmd, 1));
279 if (cmd->source == src_command)
281 if (cl_pmodel.integer == i)
283 Cvar_SetValue (&cvars_all, "_cl_pmodel", i);
284 if (cls.state == ca_connected)
285 Cmd_ForwardToServer_f(cmd);
289 PRVM_serveredictfloat(host_client->edict, pmodel) = i;
292 //===========================================================================
294 //===========================================================================
296 static void CL_SendCvar_f(cmd_state_t *cmd)
300 const char *cvarname;
304 if(Cmd_Argc(cmd) != 2)
306 cvarname = Cmd_Argv(cmd, 1);
307 if (cls.state == ca_connected)
309 c = Cvar_FindVar(&cvars_all, cvarname, CVAR_CLIENT | CVAR_SERVER);
310 // LadyHavoc: if there is no such cvar or if it is private, send a
311 // reply indicating that it has no value
312 if(!c || (c->flags & CVAR_PRIVATE))
313 Cmd_ForwardStringToServer(va(vabuf, sizeof(vabuf), "sentcvar %s", cvarname));
315 Cmd_ForwardStringToServer(va(vabuf, sizeof(vabuf), "sentcvar %s \"%s\"", c->name, c->string));
318 if(!sv.active)// || !PRVM_serverfunction(SV_ParseClientCommand))
322 if (cls.state != ca_dedicated)
326 for(;i<svs.maxclients;i++)
327 if(svs.clients[i].active && svs.clients[i].netconnection)
329 host_client = &svs.clients[i];
330 SV_ClientCommands("sendcvar %s\n", cvarname);
336 =====================
339 ProQuake rcon support
340 =====================
342 static void CL_PQRcon_f(cmd_state_t *cmd)
346 lhnetsocket_t *mysocket;
348 if (Cmd_Argc(cmd) == 1)
350 Con_Printf("%s: Usage: %s command\n", Cmd_Argv(cmd, 0), Cmd_Argv(cmd, 0));
354 if (!rcon_password.string || !rcon_password.string[0] || rcon_secure.integer > 0)
356 Con_Printf ("You must set rcon_password before issuing an pqrcon command, and rcon_secure must be 0.\n");
360 e = strchr(rcon_password.string, ' ');
361 n = e ? e-rcon_password.string : (int)strlen(rcon_password.string);
364 cls.rcon_address = cls.netcon->peeraddress;
367 if (!rcon_address.string[0])
369 Con_Printf ("You must either be connected, or set the rcon_address cvar to issue rcon commands\n");
372 LHNETADDRESS_FromString(&cls.rcon_address, rcon_address.string, sv_netport.integer);
374 mysocket = NetConn_ChooseClientSocketForAddress(&cls.rcon_address);
378 unsigned char bufdata[64];
381 MSG_WriteLong(&buf, 0);
382 MSG_WriteByte(&buf, CCREQ_RCON);
383 SZ_Write(&buf, (const unsigned char*)rcon_password.string, n);
384 MSG_WriteByte(&buf, 0); // terminate the (possibly partial) string
385 MSG_WriteString(&buf, Cmd_Args(cmd));
386 StoreBigLong(buf.data, NETFLAG_CTL | (buf.cursize & NETFLAG_LENGTH_MASK));
387 NetConn_Write(mysocket, buf.data, buf.cursize, &cls.rcon_address);
392 //=============================================================================
394 // QuakeWorld commands
397 =====================
400 Send the rest of the command line over as
401 an unconnected command.
402 =====================
404 static void CL_Rcon_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
408 lhnetsocket_t *mysocket;
410 if (Cmd_Argc(cmd) == 1)
412 Con_Printf("%s: Usage: %s command\n", Cmd_Argv(cmd, 0), Cmd_Argv(cmd, 0));
416 if (!rcon_password.string || !rcon_password.string[0])
418 Con_Printf ("You must set rcon_password before issuing an rcon command.\n");
422 e = strchr(rcon_password.string, ' ');
423 n = e ? e-rcon_password.string : (int)strlen(rcon_password.string);
426 cls.rcon_address = cls.netcon->peeraddress;
429 if (!rcon_address.string[0])
431 Con_Printf ("You must either be connected, or set the rcon_address cvar to issue rcon commands\n");
434 LHNETADDRESS_FromString(&cls.rcon_address, rcon_address.string, sv_netport.integer);
436 mysocket = NetConn_ChooseClientSocketForAddress(&cls.rcon_address);
437 if (mysocket && Cmd_Args(cmd)[0])
439 // simply put together the rcon packet and send it
440 if(Cmd_Argv(cmd, 0)[0] == 's' || rcon_secure.integer > 1)
442 if(cls.rcon_commands[cls.rcon_ringpos][0])
445 LHNETADDRESS_ToString(&cls.rcon_addresses[cls.rcon_ringpos], s, sizeof(s), true);
446 Con_Printf("rcon to %s (for command %s) failed: too many buffered commands (possibly increase MAX_RCONS)\n", s, cls.rcon_commands[cls.rcon_ringpos]);
447 cls.rcon_commands[cls.rcon_ringpos][0] = 0;
450 for (i = 0;i < MAX_RCONS;i++)
451 if(cls.rcon_commands[i][0])
452 if (!LHNETADDRESS_Compare(&cls.rcon_address, &cls.rcon_addresses[i]))
456 NetConn_WriteString(mysocket, "\377\377\377\377getchallenge", &cls.rcon_address); // otherwise we'll request the challenge later
457 strlcpy(cls.rcon_commands[cls.rcon_ringpos], Cmd_Args(cmd), sizeof(cls.rcon_commands[cls.rcon_ringpos]));
458 cls.rcon_addresses[cls.rcon_ringpos] = cls.rcon_address;
459 cls.rcon_timeout[cls.rcon_ringpos] = host.realtime + rcon_secure_challengetimeout.value;
460 cls.rcon_ringpos = (cls.rcon_ringpos + 1) % MAX_RCONS;
462 else if(rcon_secure.integer > 0)
466 dpsnprintf(argbuf, sizeof(argbuf), "%ld.%06d %s", (long) time(NULL), (int) (rand() % 1000000), Cmd_Args(cmd));
467 memcpy(buf, "\377\377\377\377srcon HMAC-MD4 TIME ", 24);
468 if(HMAC_MDFOUR_16BYTES((unsigned char *) (buf + 24), (unsigned char *) argbuf, (int)strlen(argbuf), (unsigned char *) rcon_password.string, n))
471 strlcpy(buf + 41, argbuf, sizeof(buf) - 41);
472 NetConn_Write(mysocket, buf, 41 + (int)strlen(buf + 41), &cls.rcon_address);
478 memcpy(buf, "\377\377\377\377", 4);
479 dpsnprintf(buf+4, sizeof(buf)-4, "rcon %.*s %s", n, rcon_password.string, Cmd_Args(cmd));
480 NetConn_WriteString(mysocket, buf, &cls.rcon_address);
485 static void CL_RCon_ClearPassword_c(cvar_t *var)
487 // whenever rcon_secure is changed to 0, clear rcon_password for
488 // security reasons (prevents a send-rcon-password-as-plaintext
489 // attack based on NQ protocol session takeover and svc_stufftext)
490 if(var->integer <= 0)
491 Cvar_SetQuick(&rcon_password, "");
498 Sent by server when serverinfo changes
501 // TODO: shouldn't this be a cvar instead?
502 static void CL_FullServerinfo_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
505 if (Cmd_Argc(cmd) != 2)
507 Con_Printf ("usage: fullserverinfo <complete info string>\n");
511 strlcpy (cl.qw_serverinfo, Cmd_Argv(cmd, 1), sizeof(cl.qw_serverinfo));
512 InfoString_GetValue(cl.qw_serverinfo, "teamplay", temp, sizeof(temp));
513 cl.qw_teamplay = atoi(temp);
520 Allow clients to change userinfo
524 static void CL_FullInfo_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
530 if (Cmd_Argc(cmd) != 2)
532 Con_Printf ("fullinfo <complete info string>\n");
536 s = Cmd_Argv(cmd, 1);
541 size_t len = strcspn(s, "\\");
542 if (len >= sizeof(key)) {
543 len = sizeof(key) - 1;
545 strlcpy(key, s, len + 1);
549 Con_Printf ("MISSING VALUE\n");
552 ++s; // Skip over backslash.
554 len = strcspn(s, "\\");
555 if (len >= sizeof(value)) {
556 len = sizeof(value) - 1;
558 strlcpy(value, s, len + 1);
560 CL_SetInfo(key, value, false, false, false, false);
567 ++s; // Skip over backslash.
575 Allow clients to change userinfo
578 static void CL_SetInfo_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
580 if (Cmd_Argc(cmd) == 1)
582 InfoString_Print(cls.userinfo);
585 if (Cmd_Argc(cmd) != 3)
587 Con_Printf ("usage: setinfo [ <key> <value> ]\n");
590 CL_SetInfo(Cmd_Argv(cmd, 1), Cmd_Argv(cmd, 2), true, false, false, false);
597 packet <destination> <contents>
599 Contents allows \n escape character
602 static void CL_Packet_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
608 lhnetaddress_t address;
609 lhnetsocket_t *mysocket;
611 if (Cmd_Argc(cmd) != 3)
613 Con_Printf ("packet <destination> <contents>\n");
617 if (!LHNETADDRESS_FromString (&address, Cmd_Argv(cmd, 1), sv_netport.integer))
619 Con_Printf ("Bad address\n");
623 in = Cmd_Argv(cmd, 2);
625 send[0] = send[1] = send[2] = send[3] = -1;
627 l = (int)strlen (in);
628 for (i=0 ; i<l ; i++)
630 if (out >= send + sizeof(send) - 1)
632 if (in[i] == '\\' && in[i+1] == 'n')
637 else if (in[i] == '\\' && in[i+1] == '0')
642 else if (in[i] == '\\' && in[i+1] == 't')
647 else if (in[i] == '\\' && in[i+1] == 'r')
652 else if (in[i] == '\\' && in[i+1] == '"')
661 mysocket = NetConn_ChooseClientSocketForAddress(&address);
663 mysocket = NetConn_ChooseServerSocketForAddress(&address);
665 NetConn_Write(mysocket, send, out - send, &address);
668 static void CL_PingPLReport_f(cmd_state_t *cmd)
672 int l = Cmd_Argc(cmd);
673 if (l > cl.maxclients)
675 for (i = 0;i < l;i++)
677 cl.scores[i].qw_ping = atoi(Cmd_Argv(cmd, 1+i*2));
678 cl.scores[i].qw_packetloss = strtol(Cmd_Argv(cmd, 1+i*2+1), &errbyte, 0);
679 if(errbyte && *errbyte == ',')
680 cl.scores[i].qw_movementloss = atoi(errbyte + 1);
682 cl.scores[i].qw_movementloss = 0;
686 //=============================================================================
693 void Host_InitCommands (void)
695 dpsnprintf(cls.userinfo, sizeof(cls.userinfo), "\\name\\player\\team\\none\\topcolor\\0\\bottomcolor\\0\\rate\\10000\\msg\\1\\noaim\\1\\*ver\\dp");
697 Cvar_RegisterVariable(&cl_name);
698 Cvar_RegisterAlias(&cl_name, "_cl_name");
699 Cvar_RegisterVariable(&cl_color);
700 Cvar_RegisterCallback(&cl_color, CL_Color_c);
701 Cvar_RegisterVariable(&cl_topcolor);
702 Cvar_RegisterCallback(&cl_topcolor, CL_Topcolor_c);
703 Cvar_RegisterVariable(&cl_bottomcolor);
704 Cvar_RegisterCallback(&cl_bottomcolor, CL_Bottomcolor_c);
705 Cvar_RegisterVariable(&cl_rate);
706 Cvar_RegisterAlias(&cl_rate, "_cl_rate");
707 Cvar_RegisterVariable(&cl_rate_burstsize);
708 Cvar_RegisterAlias(&cl_rate_burstsize, "_cl_rate_burstsize");
709 Cvar_RegisterVariable(&cl_pmodel);
710 Cvar_RegisterAlias(&cl_pmodel, "_cl_pmodel");
711 Cvar_RegisterVariable(&cl_playermodel);
712 Cvar_RegisterAlias(&cl_playermodel, "_cl_playermodel");
713 Cvar_RegisterVariable(&cl_playerskin);
714 Cvar_RegisterAlias(&cl_playerskin, "_cl_playerskin");
715 Cvar_RegisterVariable(&rcon_password);
716 Cvar_RegisterVariable(&rcon_address);
717 Cvar_RegisterVariable(&rcon_secure);
718 Cvar_RegisterCallback(&rcon_secure, CL_RCon_ClearPassword_c);
719 Cvar_RegisterVariable(&rcon_secure_challengetimeout);
720 Cvar_RegisterVariable(&r_fixtrans_auto);
721 Cvar_RegisterVariable(&cl_team);
722 Cvar_RegisterVariable(&cl_skin);
723 Cvar_RegisterVariable(&cl_noaim);
725 Cmd_AddCommand(CMD_CLIENT, "color", CL_Color_f, "change your player shirt and pants colors");
726 Cmd_AddCommand(CMD_USERINFO, "pmodel", CL_PModel_f, "(Nehahra-only) change your player model choice");
727 Cmd_AddCommand(CMD_USERINFO, "playermodel", CL_Playermodel_f, "change your player model");
728 Cmd_AddCommand(CMD_USERINFO, "playerskin", CL_Playerskin_f, "change your player skin number");
730 Cmd_AddCommand(CMD_CLIENT, "sendcvar", CL_SendCvar_f, "sends the value of a cvar to the server as a sentcvar command, for use by QuakeC");
731 Cmd_AddCommand(CMD_CLIENT, "rcon", CL_Rcon_f, "sends a command to the server console (if your rcon_password matches the server's rcon_password), or to the address specified by rcon_address when not connected (again rcon_password must match the server's); note: if rcon_secure is set, client and server clocks must be synced e.g. via NTP");
732 Cmd_AddCommand(CMD_CLIENT, "srcon", CL_Rcon_f, "sends a command to the server console (if your rcon_password matches the server's rcon_password), or to the address specified by rcon_address when not connected (again rcon_password must match the server's); this always works as if rcon_secure is set; note: client and server clocks must be synced e.g. via NTP");
733 Cmd_AddCommand(CMD_CLIENT, "pqrcon", CL_PQRcon_f, "sends a command to a proquake server console (if your rcon_password matches the server's rcon_password), or to the address specified by rcon_address when not connected (again rcon_password must match the server's)");
734 Cmd_AddCommand(CMD_CLIENT, "fullinfo", CL_FullInfo_f, "allows client to modify their userinfo");
735 Cmd_AddCommand(CMD_CLIENT, "setinfo", CL_SetInfo_f, "modifies your userinfo");
736 Cmd_AddCommand(CMD_CLIENT, "packet", CL_Packet_f, "send a packet to the specified address:port containing a text string");
737 Cmd_AddCommand(CMD_CLIENT, "fixtrans", Image_FixTransparentPixels_f, "change alpha-zero pixels in an image file to sensible values, and write out a new TGA (warning: SLOW)");
739 // commands that are only sent by server to client for execution
740 Cmd_AddCommand(CMD_CLIENT_FROM_SERVER, "pingplreport", CL_PingPLReport_f, "command sent by server containing client ping and packet loss values for scoreboard, triggered by pings command from client (not used by QW servers)");
741 Cmd_AddCommand(CMD_CLIENT_FROM_SERVER, "fullserverinfo", CL_FullServerinfo_f, "internal use only, sent by server to client to update client's local copy of serverinfo string");
744 void Host_NoOperation_f(cmd_state_t *cmd)