DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
cl_cmd.c File Reference
#include "quakedef.h"
#include "hmac.h"
#include "mdfour.h"
#include "image.h"
#include <time.h>
#include "cl_collision.h"
+ Include dependency graph for cl_cmd.c:

Go to the source code of this file.

Functions

static void CL_Bottomcolor_c (cvar_t *var)
 
static void CL_Color_c (cvar_t *var)
 
static void CL_Color_f (cmd_state_t *cmd)
 
void CL_ForwardToServer (const char *s)
 adds the string as a clc_stringcmd to the client message.
 
void CL_ForwardToServer_f (cmd_state_t *cmd)
 adds the current command line as a clc_stringcmd to the client message.
 
static void CL_FullInfo_f (cmd_state_t *cmd)
 
static void CL_FullServerinfo_f (cmd_state_t *cmd)
 
void CL_InitCommands (void)
 
static void CL_Name_f (cmd_state_t *cmd)
 
static void CL_Packet_f (cmd_state_t *cmd)
 
static void CL_PingPLReport_f (cmd_state_t *cmd)
 
static void CL_PQRcon_f (cmd_state_t *cmd)
 
static void CL_Rcon_f (cmd_state_t *cmd)
 
static void CL_SendCvar_f (cmd_state_t *cmd)
 
static void CL_SetInfo_f (cmd_state_t *cmd)
 
static void CL_Topcolor_c (cvar_t *var)
 
static void CL_User_f (cmd_state_t *cmd)
 
static void CL_Users_f (cmd_state_t *cmd)
 

Variables

cvar_t cl_bottomcolor = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "bottomcolor", "0", "color of your pants"}
 
cvar_t cl_color = {CF_CLIENT | CF_ARCHIVE, "_cl_color", "0", "internal storage cvar for current player colors (changed by color command)"}
 
cvar_t cl_name = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "_cl_name", "player", "player name"}
 User-visible names of these CF_USERINFO cvars must be matched in CL_SetInfo()!
 
cvar_t cl_noaim = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "noaim", "1", "QW option to disable vertical autoaim"}
 
cvar_t cl_pmodel = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "pmodel", "0", "current player model number in nehahra"}
 
cvar_t cl_rate = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate", "20000", "connection speed"}
 
cvar_t cl_rate_burstsize = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate_burstsize", "1024", "rate control burst size"}
 
cvar_t cl_skin = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "skin", "", "QW player skin name (example: base)"}
 
cvar_t cl_team = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "team", "none", "QW team (4 character limit, example: blue)"}
 
cvar_t cl_topcolor = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "topcolor", "0", "color of your shirt"}
 
cvar_t r_fixtrans_auto = {CF_CLIENT, "r_fixtrans_auto", "0", "automatically fixtrans textures (when set to 2, it also saves the fixed versions to a fixtrans directory)"}
 
cvar_t rcon_secure
 
cvar_t rcon_secure_challengetimeout
 

Function Documentation

◆ CL_Bottomcolor_c()

static void CL_Bottomcolor_c ( cvar_t * var)
static

Definition at line 282 of file cl_cmd.c.

283{
284 char vabuf[1024];
285 void (*callback_save)(cvar_t *);
286
287 callback_save = cl_color.callback;
289 Cvar_SetQuick(&cl_color, va(vabuf, sizeof(vabuf), "%i", cl_topcolor.integer*16 + var->integer));
290 cl_color.callback = callback_save;
291}
cvar_t cl_color
Definition cl_cmd.c:252
cvar_t cl_topcolor
Definition cl_cmd.c:35
char * va(char *buf, size_t buflen, const char *format,...)
Definition common.c:972
void() predraw
void Cvar_SetQuick(cvar_t *var, const char *value)
Definition cvar.c:436
#define NULL
Definition qtypes.h:12
Definition cvar.h:66
int integer
Definition cvar.h:73
void(* callback)(struct cvar_s *var)
Definition cvar.h:79

References cvar_t::callback, cl_color, cl_topcolor, Cvar_SetQuick(), cvar_t::integer, NULL, va(), and void().

Referenced by CL_InitCommands().

◆ CL_Color_c()

static void CL_Color_c ( cvar_t * var)
static

Definition at line 255 of file cl_cmd.c.

256{
257 char vabuf[1024];
258 void (*callback_save)(cvar_t *);
259
260 callback_save = cl_topcolor.callback;
262 Cvar_SetQuick(&cl_topcolor, va(vabuf, sizeof(vabuf), "%i", ((var->integer >> 4) & 15)));
263 cl_topcolor.callback = callback_save;
264
265 callback_save = cl_bottomcolor.callback;
267 Cvar_SetQuick(&cl_bottomcolor, va(vabuf, sizeof(vabuf), "%i", (var->integer & 15)));
268 cl_bottomcolor.callback = callback_save;
269}
cvar_t cl_bottomcolor
Definition cl_cmd.c:36

References cvar_t::callback, cl_bottomcolor, cl_topcolor, Cvar_SetQuick(), cvar_t::integer, NULL, va(), and void().

Referenced by CL_InitCommands().

◆ CL_Color_f()

static void CL_Color_f ( cmd_state_t * cmd)
static

Definition at line 293 of file cl_cmd.c.

294{
295 int top, bottom;
296
297 if (Cmd_Argc(cmd) == 1)
298 {
299 if (cmd->source == src_local)
300 {
301 Con_Printf("\"color\" is \"%i %i\"\n", cl_topcolor.integer, cl_bottomcolor.integer);
302 Con_Print("color <0-15> [0-15]\n");
303 }
304 return;
305 }
306
307 if (Cmd_Argc(cmd) == 2)
308 top = bottom = atoi(Cmd_Argv(cmd, 1));
309 else
310 {
311 top = atoi(Cmd_Argv(cmd, 1));
312 bottom = atoi(Cmd_Argv(cmd, 2));
313 }
314 /*
315 * This is just a convenient way to change topcolor and bottomcolor
316 * We can't change cl_color from here directly because topcolor and
317 * bottomcolor may be changed separately and do not call this function.
318 * So it has to be changed when the userinfo strings are updated, which
319 * happens twice here. Perhaps find a cleaner way?
320 */
321
322 top = top >= 0 ? top : cl_topcolor.integer;
323 bottom = bottom >= 0 ? bottom : cl_bottomcolor.integer;
324
325 top &= 15;
326 bottom &= 15;
327
328 // LadyHavoc: allowing skin colormaps 14 and 15 by commenting this out
329 //if (top > 13)
330 // top = 13;
331 //if (bottom > 13)
332 // bottom = 13;
333
334 if (cmd->source == src_local)
335 {
338 return;
339 }
340}
@ src_local
from the command buffer
Definition cmd.h:75
static int Cmd_Argc(cmd_state_t *cmd)
Definition cmd.h:249
static const char * Cmd_Argv(cmd_state_t *cmd, int arg)
Cmd_Argv(cmd, ) will return an empty string (not a NULL) if arg > argc, so string operations are alwa...
Definition cmd.h:254
void Con_Print(const char *msg)
Prints to all appropriate console targets, and adds timestamps.
Definition console.c:1504
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
Definition console.c:1514
void Cvar_SetValueQuick(cvar_t *var, float value)
Definition cvar.c:473
void cmd(string command,...)

References cl_bottomcolor, cl_topcolor, cmd(), Cmd_Argc(), Cmd_Argv(), Con_Print(), Con_Printf(), Cvar_SetValueQuick(), cvar_t::integer, and src_local.

Referenced by CL_InitCommands().

◆ CL_ForwardToServer()

void CL_ForwardToServer ( const char * s)

adds the string as a clc_stringcmd to the client message.

(used when there is no reason to generate a local command to do it)

Definition at line 54 of file cl_cmd.c.

55{
56 char temp[128];
57 if (cls.state != ca_connected)
58 {
59 Con_Printf("Can't \"%s\", not connected\n", s);
60 return;
61 }
62
63 if (!cls.netcon)
64 return;
65
66 // LadyHavoc: thanks to Fuh for bringing the pure evil of SZ_Print to my
67 // attention, it has been eradicated from here, its only (former) use in
68 // all of darkplaces.
71 else
73 if ((!strncmp(s, "say ", 4) || !strncmp(s, "say_team ", 9)) && cl_locs_enable.integer)
74 {
75 // say/say_team commands can replace % character codes with status info
76 while (*s)
77 {
78 if (*s == '%' && s[1])
79 {
80 // handle proquake message macros
81 temp[0] = 0;
82 switch (s[1])
83 {
84 case 'l': // current location
85 CL_Locs_FindLocationName(temp, sizeof(temp), cl.movement_origin);
86 break;
87 case 'h': // current health
88 dpsnprintf(temp, sizeof(temp), "%i", cl.stats[STAT_HEALTH]);
89 break;
90 case 'a': // current armor
91 dpsnprintf(temp, sizeof(temp), "%i", cl.stats[STAT_ARMOR]);
92 break;
93 case 'x': // current rockets
94 dpsnprintf(temp, sizeof(temp), "%i", cl.stats[STAT_ROCKETS]);
95 break;
96 case 'c': // current cells
97 dpsnprintf(temp, sizeof(temp), "%i", cl.stats[STAT_CELLS]);
98 break;
99 // silly proquake macros
100 case 'd': // loc at last death
101 CL_Locs_FindLocationName(temp, sizeof(temp), cl.lastdeathorigin);
102 break;
103 case 't': // current time
104 dpsnprintf(temp, sizeof(temp), "%.0f:%.0f", floor(cl.time / 60), cl.time - floor(cl.time / 60) * 60);
105 break;
106 case 'r': // rocket launcher status ("I have RL", "I need rockets", "I need RL")
108 dpsnprintf(temp, sizeof(temp), "I need RL");
109 else if (!cl.stats[STAT_ROCKETS])
110 dpsnprintf(temp, sizeof(temp), "I need rockets");
111 else
112 dpsnprintf(temp, sizeof(temp), "I have RL");
113 break;
114 case 'p': // powerup status (outputs "quad" "pent" and "eyes" according to status)
115 if (cl.stats[STAT_ITEMS] & IT_QUAD)
116 {
117 if (temp[0])
118 dp_strlcat(temp, " ", sizeof(temp));
119 dp_strlcat(temp, "quad", sizeof(temp));
120 }
122 {
123 if (temp[0])
124 dp_strlcat(temp, " ", sizeof(temp));
125 dp_strlcat(temp, "pent", sizeof(temp));
126 }
128 {
129 if (temp[0])
130 dp_strlcat(temp, " ", sizeof(temp));
131 dp_strlcat(temp, "eyes", sizeof(temp));
132 }
133 break;
134 case 'w': // weapon status (outputs "SSG:NG:SNG:GL:RL:LG" with the text between : characters omitted if you lack the weapon)
136 dp_strlcat(temp, "SSG", sizeof(temp));
137 dp_strlcat(temp, ":", sizeof(temp));
139 dp_strlcat(temp, "NG", sizeof(temp));
140 dp_strlcat(temp, ":", sizeof(temp));
142 dp_strlcat(temp, "SNG", sizeof(temp));
143 dp_strlcat(temp, ":", sizeof(temp));
145 dp_strlcat(temp, "GL", sizeof(temp));
146 dp_strlcat(temp, ":", sizeof(temp));
148 dp_strlcat(temp, "RL", sizeof(temp));
149 dp_strlcat(temp, ":", sizeof(temp));
151 dp_strlcat(temp, "LG", sizeof(temp));
152 break;
153 default:
154 // not a recognized macro, print it as-is...
155 temp[0] = s[0];
156 temp[1] = s[1];
157 temp[2] = 0;
158 break;
159 }
160 // write the resulting text
161 SZ_Write(&cls.netcon->message, (unsigned char *)temp, (int)strlen(temp));
162 s += 2;
163 continue;
164 }
166 s++;
167 }
169 }
170 else // any other command is passed on as-is
171 SZ_Write(&cls.netcon->message, (const unsigned char *)s, (int)strlen(s) + 1);
172}
void CL_Locs_FindLocationName(char *buffer, size_t buffersize, vec3_t point)
Definition cl_main.c:2218
cvar_t cl_locs_enable
Definition cl_main.c:97
client_state_t cl
Definition cl_main.c:117
client_static_t cls
Definition cl_main.c:116
@ ca_connected
Definition client.h:532
void MSG_WriteByte(sizebuf_t *sb, int c)
Definition com_msg.c:130
void SZ_Write(sizebuf_t *buf, const unsigned char *data, int length)
Definition common.c:72
int dpsnprintf(char *buffer, size_t buffersize, const char *format,...)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
Definition common.c:997
@ PROTOCOL_QUAKEWORLD
quakeworld protocol
Definition common.h:145
#define dp_strlcat(dst, src, dsize)
Definition common.h:304
float strlen(string s)
float floor(float f)
#define qw_clc_stringcmd
Definition protocol.h:957
#define clc_stringcmd
Definition protocol.h:291
#define STAT_HEALTH
Definition qstats.h:8
#define STAT_CELLS
Definition qstats.h:17
#define STAT_ARMOR
Definition qstats.h:12
#define STAT_ITEMS
FTE, DP.
Definition qstats.h:23
#define STAT_ROCKETS
Definition qstats.h:16
#define IT_LIGHTNING
Definition quakedef.h:44
#define IT_GRENADE_LAUNCHER
Definition quakedef.h:42
#define IT_SUPER_SHOTGUN
Definition quakedef.h:39
#define IT_NAILGUN
Definition quakedef.h:40
#define IT_INVISIBILITY
Definition quakedef.h:57
#define IT_ROCKET_LAUNCHER
Definition quakedef.h:43
#define IT_INVULNERABILITY
Definition quakedef.h:58
#define IT_SUPER_NAILGUN
Definition quakedef.h:41
#define IT_QUAD
Definition quakedef.h:60
vec3_t movement_origin
Definition client.h:809
vec3_t lastdeathorigin
Definition client.h:1128
double time
Definition client.h:868
int stats[MAX_CL_STATS]
Definition client.h:758
cactive_t state
Definition client.h:568
netconn_t * netcon
Definition client.h:630
protocolversion_t protocol
Definition client.h:617
sizebuf_t message
writing buffer to send to peer as the next reliable message can be added to at any time,...
Definition netconn.h:161

References ca_connected, cl, cl_locs_enable, CL_Locs_FindLocationName(), clc_stringcmd, cls, Con_Printf(), dp_strlcat, dpsnprintf(), floor(), cvar_t::integer, IT_GRENADE_LAUNCHER, IT_INVISIBILITY, IT_INVULNERABILITY, IT_LIGHTNING, IT_NAILGUN, IT_QUAD, IT_ROCKET_LAUNCHER, IT_SUPER_NAILGUN, IT_SUPER_SHOTGUN, client_state_t::lastdeathorigin, netconn_t::message, client_state_t::movement_origin, MSG_WriteByte(), client_static_t::netcon, client_static_t::protocol, PROTOCOL_QUAKEWORLD, qw_clc_stringcmd, STAT_ARMOR, STAT_CELLS, STAT_HEALTH, STAT_ITEMS, STAT_ROCKETS, client_static_t::state, client_state_t::stats, strlen(), SZ_Write(), and client_state_t::time.

Referenced by CL_BeginDownloads(), CL_DownloadBegin_f(), CL_ForwardToServer_f(), CL_SendCvar_f(), Key_Message(), and NetConn_ConnectionEstablished().

◆ CL_ForwardToServer_f()

void CL_ForwardToServer_f ( cmd_state_t * cmd)

adds the current command line as a clc_stringcmd to the client message.

things like godmode, noclip, etc, are commands directed to the server, so when they are typed in at the console, they will need to be forwarded.

Definition at line 174 of file cl_cmd.c.

175{
176 const char *s;
177 char vabuf[MAX_INPUTLINE];
178 size_t i;
179 if (!strcasecmp(Cmd_Argv(cmd, 0), "cmd"))
180 {
181 // we want to strip off "cmd", so just send the args
182 s = Cmd_Argc(cmd) > 1 ? Cmd_Args(cmd) : "";
183 }
184 else
185 {
186 // we need to keep the command name, so send Cmd_Argv(cmd, 0), a space and then Cmd_Args(cmd)
187 i = dpsnprintf(vabuf, sizeof(vabuf), "%s", Cmd_Argv(cmd, 0));
188 if(Cmd_Argc(cmd) > 1)
189 // (i + 1) accounts for the added space
190 dpsnprintf(&vabuf[i], sizeof(vabuf) - (i + 1), " %s", Cmd_Args(cmd));
191 s = vabuf;
192 }
193 // don't send an empty forward message if the user tries "cmd" by itself
194 if (!s || !*s)
195 return;
197}
void CL_ForwardToServer(const char *s)
adds the string as a clc_stringcmd to the client message.
Definition cl_cmd.c:54
static const char * Cmd_Args(cmd_state_t *cmd)
Definition cmd.h:260
int i
#define MAX_INPUTLINE
maximum size of console commandline, QuakeC strings, and many other text processing buffers
Definition qdefs.h:94

References CL_ForwardToServer(), cmd(), Cmd_Argc(), Cmd_Args(), Cmd_Argv(), dpsnprintf(), i, and MAX_INPUTLINE.

Referenced by CL_InitCommands(), and Cmd_CL_Callback().

◆ CL_FullInfo_f()

static void CL_FullInfo_f ( cmd_state_t * cmd)
static

Definition at line 655 of file cl_cmd.c.

656{
657 char key[512];
658 char value[512];
659 const char *s;
660
661 if (Cmd_Argc(cmd) != 2)
662 {
663 Con_Printf ("fullinfo <complete info string>\n");
664 return;
665 }
666
667 s = Cmd_Argv(cmd, 1);
668 if (*s == '\\')
669 s++;
670 while (*s)
671 {
672 size_t len = strcspn(s, "\\");
673 if (len >= sizeof(key)) {
674 len = sizeof(key) - 1;
675 }
676 dp_strlcpy(key, s, len + 1);
677 s += len;
678 if (!*s)
679 {
680 Con_Printf ("MISSING VALUE\n");
681 return;
682 }
683 ++s; // Skip over backslash.
684
685 len = strcspn(s, "\\");
686 if (len >= sizeof(value)) {
687 len = sizeof(value) - 1;
688 }
689 dp_strlcpy(value, s, len + 1);
690
691 CL_SetInfo(key, value, false, false, false, false);
692
693 s += len;
694 if (!*s)
695 {
696 break;
697 }
698 ++s; // Skip over backslash.
699 }
700}
void CL_SetInfo(const char *key, const char *value, qbool send, qbool allowstarkey, qbool allowmodel, qbool quiet)
Definition cl_main.c:233
#define dp_strlcpy(dst, src, dsize)
Definition common.h:303
GLsizei const GLfloat * value
Definition glquake.h:740

References CL_SetInfo(), cmd(), Cmd_Argc(), Cmd_Argv(), Con_Printf(), dp_strlcpy, and value.

Referenced by CL_InitCommands().

◆ CL_FullServerinfo_f()

static void CL_FullServerinfo_f ( cmd_state_t * cmd)
static

Definition at line 633 of file cl_cmd.c.

634{
635 char temp[512];
636 if (Cmd_Argc(cmd) != 2)
637 {
638 Con_Printf ("usage: fullserverinfo <complete info string>\n");
639 return;
640 }
641
643 InfoString_GetValue(cl.qw_serverinfo, "teamplay", temp, sizeof(temp));
644 cl.qw_teamplay = atoi(temp);
645}
size_t InfoString_GetValue(const char *buffer, const char *key, char *value, size_t valuesize)
Returns the number of bytes written to *value excluding the \0 terminator.
char qw_serverinfo[MAX_SERVERINFO_STRING]
Definition client.h:1033

References cl, cmd(), Cmd_Argc(), Cmd_Argv(), Con_Printf(), dp_strlcpy, InfoString_GetValue(), client_state_t::qw_serverinfo, and client_state_t::qw_teamplay.

Referenced by CL_InitCommands().

◆ CL_InitCommands()

void CL_InitCommands ( void )

Definition at line 742 of file cl_cmd.c.

743{
744 dpsnprintf(cls.userinfo, sizeof(cls.userinfo), "\\name\\player\\team\\none\\topcolor\\0\\bottomcolor\\0\\rate\\10000\\msg\\1\\noaim\\1\\*ver\\dp");
745
746 /* In Quake `name` is a command that concatenates its arguments (quotes unnecessary)
747 * which is expected in most DP-based games.
748 * In QuakeWorld it's a cvar which requires quotes if spaces are used.
749 */
751 if ((0)) // TODO: if (gamemode == GAME_QUAKEWORLD)
753 else
754 Cmd_AddCommand(CF_CLIENT, "name", CL_Name_f, "change your player name");
755
757 Cvar_RegisterVirtual(&cl_rate, "_cl_rate");
759 Cvar_RegisterVirtual(&cl_rate_burstsize, "_cl_rate_burstsize");
761 Cvar_RegisterVirtual(&cl_pmodel, "_cl_pmodel");
772
773 Cmd_AddCommand(CF_CLIENT | CF_CLIENT_FROM_SERVER, "cmd", CL_ForwardToServer_f, "send a console commandline to the server (used by some mods)");
774 Cmd_AddCommand(CF_CLIENT, "color", CL_Color_f, "change your player shirt and pants colors");
775 Cmd_AddCommand(CF_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");
776 Cmd_AddCommand(CF_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");
777 Cmd_AddCommand(CF_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)");
778 Cmd_AddCommand(CF_SHARED, "user", CL_User_f, "prints additional information about a player number or name on the scoreboard");
779 Cmd_AddCommand(CF_SHARED, "users", CL_Users_f, "prints additional information about all players on the scoreboard");
780 Cmd_AddCommand(CF_CLIENT, "packet", CL_Packet_f, "send a packet to the specified address:port containing a text string");
781 Cmd_AddCommand(CF_CLIENT, "fullinfo", CL_FullInfo_f, "allows client to modify their userinfo");
782 Cmd_AddCommand(CF_CLIENT, "setinfo", CL_SetInfo_f, "modifies your userinfo");
783 Cmd_AddCommand(CF_CLIENT, "fixtrans", Image_FixTransparentPixels_f, "change alpha-zero pixels in an image file to sensible values, and write out a new TGA (warning: SLOW)");
785
786 // commands that are only sent by server to client for execution
787 Cmd_AddCommand(CF_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)");
788 Cmd_AddCommand(CF_CLIENT_FROM_SERVER, "fullserverinfo", CL_FullServerinfo_f, "internal use only, sent by server to client to update client's local copy of serverinfo string");
789}
static void CL_PQRcon_f(cmd_state_t *cmd)
Definition cl_cmd.c:486
static void CL_FullInfo_f(cmd_state_t *cmd)
Definition cl_cmd.c:655
static void CL_SetInfo_f(cmd_state_t *cmd)
Definition cl_cmd.c:709
static void CL_Color_c(cvar_t *var)
Definition cl_cmd.c:255
cvar_t r_fixtrans_auto
Definition cl_cmd.c:42
static void CL_Rcon_f(cmd_state_t *cmd)
Definition cl_cmd.c:544
void CL_ForwardToServer_f(cmd_state_t *cmd)
adds the current command line as a clc_stringcmd to the client message.
Definition cl_cmd.c:174
static void CL_PingPLReport_f(cmd_state_t *cmd)
Definition cl_cmd.c:724
cvar_t cl_rate_burstsize
Definition cl_cmd.c:34
static void CL_SendCvar_f(cmd_state_t *cmd)
Definition cl_cmd.c:199
static void CL_FullServerinfo_f(cmd_state_t *cmd)
Definition cl_cmd.c:633
cvar_t cl_rate
Definition cl_cmd.c:33
static void CL_Color_f(cmd_state_t *cmd)
Definition cl_cmd.c:293
cvar_t cl_name
User-visible names of these CF_USERINFO cvars must be matched in CL_SetInfo()!
Definition cl_cmd.c:32
static void CL_Topcolor_c(cvar_t *var)
Definition cl_cmd.c:271
static void CL_Name_f(cmd_state_t *cmd)
Definition cl_cmd.c:228
cvar_t cl_skin
Definition cl_cmd.c:38
cvar_t cl_noaim
Definition cl_cmd.c:39
static void CL_Users_f(cmd_state_t *cmd)
Definition cl_cmd.c:384
cvar_t cl_team
Definition cl_cmd.c:37
static void CL_Bottomcolor_c(cvar_t *var)
Definition cl_cmd.c:282
static void CL_Packet_f(cmd_state_t *cmd)
Definition cl_cmd.c:413
cvar_t cl_pmodel
Definition cl_cmd.c:40
static void CL_User_f(cmd_state_t *cmd)
Definition cl_cmd.c:351
void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description)
called by the init functions of other parts of the program to register commands and functions to call...
Definition cmd.c:1661
#define CF_SHARED
Definition cmd.h:67
#define CF_CLIENT
cvar/command that only the client can change/execute
Definition cmd.h:48
#define CF_CLIENT_FROM_SERVER
command that the server is allowed to execute on the client
Definition cmd.h:50
void Cvar_RegisterVariable(cvar_t *variable)
registers a cvar that already has the name, string, and optionally the archive elements set.
Definition cvar.c:599
void Cvar_RegisterVirtual(cvar_t *variable, const char *name)
Definition cvar.c:513
void Cvar_RegisterCallback(cvar_t *variable, void(*callback)(cvar_t *))
Definition cvar.c:495
host_static_t host
Definition host.c:41
void Image_FixTransparentPixels_f(cmd_state_t *cmd)
Definition image.c:1376
char userinfo[MAX_USERINFO_STRING]
Definition client.h:669
void(* CL_SendCvar)(struct cmd_state_s *)
Definition host.h:58
struct host_static_t::@12 hook

References CF_CLIENT, CF_CLIENT_FROM_SERVER, CF_SHARED, cl_bottomcolor, CL_Bottomcolor_c(), cl_color, CL_Color_c(), CL_Color_f(), CL_ForwardToServer_f(), CL_FullInfo_f(), CL_FullServerinfo_f(), cl_name, CL_Name_f(), cl_noaim, CL_Packet_f(), CL_PingPLReport_f(), cl_pmodel, CL_PQRcon_f(), cl_rate, cl_rate_burstsize, CL_Rcon_f(), host_static_t::CL_SendCvar, CL_SendCvar_f(), CL_SetInfo_f(), cl_skin, cl_team, cl_topcolor, CL_Topcolor_c(), CL_User_f(), CL_Users_f(), cls, Cmd_AddCommand(), Cvar_RegisterCallback(), Cvar_RegisterVariable(), Cvar_RegisterVirtual(), dpsnprintf(), host_static_t::hook, host, Image_FixTransparentPixels_f(), r_fixtrans_auto, and client_static_t::userinfo.

Referenced by CL_Init().

◆ CL_Name_f()

static void CL_Name_f ( cmd_state_t * cmd)
static

Definition at line 228 of file cl_cmd.c.

229{
230 char *newNameSource;
231
232 if (Cmd_Argc(cmd) == 1)
233 {
234 Con_Printf("name: \"%s^7\"\n", cl_name.string);
235 return;
236 }
237
238 // in the single-arg case any enclosing quotes shall be stripped
239 newNameSource = (char *)(Cmd_Argc(cmd) == 2 ? Cmd_Argv(cmd, 1) : Cmd_Args(cmd));
240
241 if (strlen(newNameSource) >= MAX_SCOREBOARDNAME) // may as well truncate before networking
242 newNameSource[MAX_SCOREBOARDNAME - 1] = '\0'; // this is fine (cbuf stores length)
243
244 Cvar_SetQuick(&cl_name, newNameSource);
245}
#define MAX_SCOREBOARDNAME
max length of player name in game
Definition qdefs.h:111
const char * string
Definition cvar.h:71

References cl_name, cmd(), Cmd_Argc(), Cmd_Args(), Cmd_Argv(), Con_Printf(), Cvar_SetQuick(), MAX_SCOREBOARDNAME, cvar_t::string, and strlen().

Referenced by CL_InitCommands().

◆ CL_Packet_f()

static void CL_Packet_f ( cmd_state_t * cmd)
static

Definition at line 413 of file cl_cmd.c.

414{
415 char send[2048];
416 int i, l;
417 const char *in;
418 char *out;
419 lhnetaddress_t address;
420 lhnetsocket_t *mysocket;
421
422 if (Cmd_Argc(cmd) != 3)
423 {
424 Con_Printf ("packet <destination> <contents>\n");
425 return;
426 }
427
429 {
430 Con_Printf ("Bad address\n");
431 return;
432 }
433
434 in = Cmd_Argv(cmd, 2);
435 out = send+4;
436 send[0] = send[1] = send[2] = send[3] = -1;
437
438 l = (int)strlen (in);
439 for (i=0 ; i<l ; i++)
440 {
441 if (out >= send + sizeof(send) - 1)
442 break;
443 if (in[i] == '\\' && in[i+1] == 'n')
444 {
445 *out++ = '\n';
446 i++;
447 }
448 else if (in[i] == '\\' && in[i+1] == '0')
449 {
450 *out++ = '\0';
451 i++;
452 }
453 else if (in[i] == '\\' && in[i+1] == 't')
454 {
455 *out++ = '\t';
456 i++;
457 }
458 else if (in[i] == '\\' && in[i+1] == 'r')
459 {
460 *out++ = '\r';
461 i++;
462 }
463 else if (in[i] == '\\' && in[i+1] == '"')
464 {
465 *out++ = '\"';
466 i++;
467 }
468 else
469 *out++ = in[i];
470 }
471
472 mysocket = NetConn_ChooseClientSocketForAddress(&address);
473 if (!mysocket)
474 mysocket = NetConn_ChooseServerSocketForAddress(&address);
475 if (mysocket)
476 NetConn_Write(mysocket, send, out - send, &address);
477}
static int(ZEXPORT *qz_inflate)(z_stream *strm
int LHNETADDRESS_FromString(lhnetaddress_t *vaddress, const char *string, int defaultport)
Definition lhnet.c:204
int NetConn_Write(lhnetsocket_t *mysocket, const void *data, int length, const lhnetaddress_t *peeraddress)
Definition netconn.c:758
lhnetsocket_t * NetConn_ChooseClientSocketForAddress(lhnetaddress_t *address)
Definition netconn.c:1198
lhnetsocket_t * NetConn_ChooseServerSocketForAddress(lhnetaddress_t *address)
Definition netconn.c:1209
cvar_t sv_netport
Definition netconn.c:156

References cmd(), Cmd_Argc(), Cmd_Argv(), Con_Printf(), i, int(), cvar_t::integer, LHNETADDRESS_FromString(), NetConn_ChooseClientSocketForAddress(), NetConn_ChooseServerSocketForAddress(), NetConn_Write(), strlen(), and sv_netport.

Referenced by CL_InitCommands().

◆ CL_PingPLReport_f()

static void CL_PingPLReport_f ( cmd_state_t * cmd)
static

Definition at line 724 of file cl_cmd.c.

725{
726 char *errbyte;
727 int i;
728 int l = Cmd_Argc(cmd);
729 if (l > cl.maxclients)
730 l = cl.maxclients;
731 for (i = 0;i < l;i++)
732 {
733 cl.scores[i].qw_ping = atoi(Cmd_Argv(cmd, 1+i*2));
734 cl.scores[i].qw_packetloss = strtol(Cmd_Argv(cmd, 1+i*2+1), &errbyte, 0);
735 if(errbyte && *errbyte == ',')
736 cl.scores[i].qw_movementloss = atoi(errbyte + 1);
737 else
739 }
740}
scoreboard_t * scores
Definition client.h:945
int qw_movementloss
Definition client.h:498
int qw_packetloss
Definition client.h:497
int qw_ping
Definition client.h:496

References cl, cmd(), Cmd_Argc(), Cmd_Argv(), i, client_state_t::maxclients, scoreboard_t::qw_movementloss, scoreboard_t::qw_packetloss, scoreboard_t::qw_ping, and client_state_t::scores.

Referenced by CL_InitCommands().

◆ CL_PQRcon_f()

static void CL_PQRcon_f ( cmd_state_t * cmd)
static

Definition at line 486 of file cl_cmd.c.

487{
488 int n;
489 const char *e;
490 lhnetsocket_t *mysocket;
491
492 if (Cmd_Argc(cmd) == 1)
493 {
494 Con_Printf("%s: Usage: %s command\n", Cmd_Argv(cmd, 0), Cmd_Argv(cmd, 0));
495 return;
496 }
497
499 {
500 Con_Printf ("You must set rcon_password before issuing an pqrcon command, and rcon_secure must be 0.\n");
501 return;
502 }
503
504 e = strchr(rcon_password.string, ' ');
506
507 if (cls.netcon)
509 else
510 {
511 if (!rcon_address.string[0])
512 {
513 Con_Printf ("You must either be connected, or set the rcon_address cvar to issue rcon commands\n");
514 return;
515 }
517 }
519 if (mysocket)
520 {
522 unsigned char bufdata[64];
523 buf.data = bufdata;
524 SZ_Clear(&buf);
525 MSG_WriteLong(&buf, 0);
527 SZ_Write(&buf, (const unsigned char*)rcon_password.string, n);
528 MSG_WriteByte(&buf, 0); // terminate the (possibly partial) string
531 NetConn_Write(mysocket, buf.data, buf.cursize, &cls.rcon_address);
532 SZ_Clear(&buf);
533 }
534}
cvar_t rcon_secure
Definition console.c:90
cvar_t rcon_password
Definition console.c:89
cvar_t rcon_address
Definition console.c:92
void MSG_WriteString(sizebuf_t *sb, const char *s)
Definition com_msg.c:173
void MSG_WriteLong(sizebuf_t *sb, int c)
Definition com_msg.c:147
void StoreBigLong(unsigned char *buffer, unsigned int i)
Encode a big endian 32bit int to the given buffer.
Definition com_msg.c:81
void SZ_Clear(sizebuf_t *buf)
Definition common.c:44
#define n(x, y)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition glquake.h:657
#define NETFLAG_CTL
Definition netconn.h:44
#define NETFLAG_LENGTH_MASK
Definition netconn.h:35
#define CCREQ_RCON
Definition netconn.h:123
lhnetaddress_t rcon_address
Definition client.h:614
lhnetaddress_t peeraddress
Definition netconn.h:147

References buf, CCREQ_RCON, cls, cmd(), Cmd_Argc(), Cmd_Args(), Cmd_Argv(), Con_Printf(), int(), cvar_t::integer, LHNETADDRESS_FromString(), MSG_WriteByte(), MSG_WriteLong(), MSG_WriteString(), n, client_static_t::netcon, NetConn_ChooseClientSocketForAddress(), NetConn_Write(), NETFLAG_CTL, NETFLAG_LENGTH_MASK, netconn_t::peeraddress, client_static_t::rcon_address, rcon_address, rcon_password, rcon_secure, StoreBigLong(), cvar_t::string, strlen(), sv_netport, SZ_Clear(), and SZ_Write().

Referenced by CL_InitCommands().

◆ CL_Rcon_f()

static void CL_Rcon_f ( cmd_state_t * cmd)
static

Definition at line 544 of file cl_cmd.c.

545{
546 int i, n;
547 const char *e;
548 lhnetsocket_t *mysocket;
549
550 if (Cmd_Argc(cmd) == 1)
551 {
552 Con_Printf("%s: Usage: %s command\n", Cmd_Argv(cmd, 0), Cmd_Argv(cmd, 0));
553 return;
554 }
555
557 {
558 Con_Printf ("You must set rcon_password before issuing an rcon command.\n");
559 return;
560 }
561
562 e = strchr(rcon_password.string, ' ');
564
565 if (cls.netcon)
567 else
568 {
569 if (!rcon_address.string[0])
570 {
571 Con_Printf ("You must either be connected, or set the rcon_address cvar to issue rcon commands\n");
572 return;
573 }
575 }
577 if (mysocket && Cmd_Args(cmd)[0])
578 {
579 // simply put together the rcon packet and send it
580 if(Cmd_Argv(cmd, 0)[0] == 's' || rcon_secure.integer > 1)
581 {
583 {
584 char s[128];
586 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]);
589 }
590 for (i = 0;i < MAX_RCONS;i++)
591 if(cls.rcon_commands[i][0])
593 break;
595 if(i >= MAX_RCONS)
596 NetConn_WriteString(mysocket, "\377\377\377\377getchallenge", &cls.rcon_address); // otherwise we'll request the challenge later
601 }
602 else if(rcon_secure.integer > 0)
603 {
604 char buf[1500];
605 char argbuf[1500];
606 dpsnprintf(argbuf, sizeof(argbuf), "%ld.%06d %s", (long) time(NULL), (int) (rand() % 1000000), Cmd_Args(cmd));
607 memcpy(buf, "\377\377\377\377srcon HMAC-MD4 TIME ", 24);
608 if(HMAC_MDFOUR_16BYTES((unsigned char *) (buf + 24), (unsigned char *) argbuf, (int)strlen(argbuf), (unsigned char *) rcon_password.string, n))
609 {
610 buf[40] = ' ';
611 dp_strlcpy(buf + 41, argbuf, sizeof(buf) - 41);
612 NetConn_Write(mysocket, buf, 41 + (int)strlen(buf + 41), &cls.rcon_address);
613 }
614 }
615 else
616 {
617 char buf[1500];
618 memcpy(buf, "\377\377\377\377", 4);
619 dpsnprintf(buf+4, sizeof(buf)-4, "rcon %.*s %s", n, rcon_password.string, Cmd_Args(cmd));
621 }
622 }
623}
cvar_t rcon_secure_challengetimeout
Definition console.c:91
#define MAX_RCONS
Definition client.h:619
float time
#define HMAC_MDFOUR_16BYTES(out, in, n, key, k)
Definition hmac.h:14
int LHNETADDRESS_ToString(const lhnetaddress_t *vaddress, char *string, int stringbuffersize, int includeport)
Returns the number of bytes written to *string excluding the \0 terminator.
Definition lhnet.c:540
int LHNETADDRESS_Compare(const lhnetaddress_t *vaddress1, const lhnetaddress_t *vaddress2)
Definition lhnet.c:665
int NetConn_WriteString(lhnetsocket_t *mysocket, const char *string, const lhnetaddress_t *peeraddress)
Definition netconn.c:783
lhnetaddress_t rcon_addresses[MAX_RCONS]
Definition client.h:621
double rcon_timeout[MAX_RCONS]
Definition client.h:623
char rcon_commands[MAX_RCONS][MAX_INPUTLINE]
Definition client.h:622
float value
Definition cvar.h:74
double realtime
the accumulated mainloop time since application started (with filtering), without any slowmo or clamp...
Definition host.h:46

References buf, cls, cmd(), Cmd_Argc(), Cmd_Args(), Cmd_Argv(), Con_Printf(), dp_strlcpy, dpsnprintf(), HMAC_MDFOUR_16BYTES, host, i, int(), cvar_t::integer, LHNETADDRESS_Compare(), LHNETADDRESS_FromString(), LHNETADDRESS_ToString(), MAX_RCONS, n, client_static_t::netcon, NetConn_ChooseClientSocketForAddress(), NetConn_Write(), NetConn_WriteString(), NULL, netconn_t::peeraddress, client_static_t::rcon_address, rcon_address, client_static_t::rcon_addresses, client_static_t::rcon_commands, rcon_password, client_static_t::rcon_ringpos, rcon_secure, rcon_secure_challengetimeout, client_static_t::rcon_timeout, client_static_t::rcon_trying, host_static_t::realtime, cvar_t::string, strlen(), sv_netport, time, and cvar_t::value.

Referenced by CL_InitCommands().

◆ CL_SendCvar_f()

static void CL_SendCvar_f ( cmd_state_t * cmd)
static

Definition at line 199 of file cl_cmd.c.

200{
201 cvar_t *c;
202 const char *cvarname;
203 char vabuf[1024];
204
205 if(Cmd_Argc(cmd) != 2)
206 return;
207 cvarname = Cmd_Argv(cmd, 1);
208 if (cls.state == ca_connected)
209 {
210 c = Cvar_FindVar(&cvars_all, cvarname, CF_CLIENT | CF_SERVER);
211 // LadyHavoc: if there is no such cvar or if it is private, send a
212 // reply indicating that it has no value
213 if(!c || (c->flags & CF_PRIVATE))
214 CL_ForwardToServer(va(vabuf, sizeof(vabuf), "sentcvar %s", cvarname));
215 else
216 CL_ForwardToServer(va(vabuf, sizeof(vabuf), "sentcvar %s \"%s\"", c->name, c->string));
217 return;
218 }
219}
#define CF_SERVER
cvar/command that only the server can change/execute
Definition cmd.h:49
#define CF_PRIVATE
cvar should not be $ expanded or sent to the server under any circumstances (rcon_password,...
Definition cmd.h:59
cvar_state_t cvars_all
Definition cvar.c:28
cvar_t * Cvar_FindVar(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
Definition cvar.c:36
unsigned flags
Definition cvar.h:67
const char * name
Definition cvar.h:69

References ca_connected, CF_CLIENT, CF_PRIVATE, CF_SERVER, CL_ForwardToServer(), cls, cmd(), Cmd_Argc(), Cmd_Argv(), Cvar_FindVar(), cvars_all, cvar_t::flags, cvar_t::name, client_static_t::state, cvar_t::string, and va().

Referenced by CL_InitCommands().

◆ CL_SetInfo_f()

static void CL_SetInfo_f ( cmd_state_t * cmd)
static

Definition at line 709 of file cl_cmd.c.

710{
711 if (Cmd_Argc(cmd) == 1)
712 {
714 return;
715 }
716 if (Cmd_Argc(cmd) != 3)
717 {
718 Con_Printf ("usage: setinfo [ <key> <value> ]\n");
719 return;
720 }
721 CL_SetInfo(Cmd_Argv(cmd, 1), Cmd_Argv(cmd, 2), true, false, false, false);
722}
void InfoString_Print(char *buffer)

References CL_SetInfo(), cls, cmd(), Cmd_Argc(), Cmd_Argv(), Con_Printf(), InfoString_Print(), and client_static_t::userinfo.

Referenced by CL_InitCommands().

◆ CL_Topcolor_c()

static void CL_Topcolor_c ( cvar_t * var)
static

Definition at line 271 of file cl_cmd.c.

272{
273 char vabuf[1024];
274 void (*callback_save)(cvar_t *);
275
276 callback_save = cl_color.callback;
278 Cvar_SetQuick(&cl_color, va(vabuf, sizeof(vabuf), "%i", var->integer*16 + cl_bottomcolor.integer));
279 cl_color.callback = callback_save;
280}

References cvar_t::callback, cl_bottomcolor, cl_color, Cvar_SetQuick(), cvar_t::integer, NULL, va(), and void().

Referenced by CL_InitCommands().

◆ CL_User_f()

static void CL_User_f ( cmd_state_t * cmd)
static

Definition at line 351 of file cl_cmd.c.

352{
353 int uid;
354 int i;
355
356 if (Cmd_Argc(cmd) != 2)
357 {
358 Con_Printf ("Usage: user <username / userid>\n");
359 return;
360 }
361
362 uid = atoi(Cmd_Argv(cmd, 1));
363
364 for (i = 0;i < cl.maxclients;i++)
365 {
366 if (!cl.scores[i].name[0])
367 continue;
368 if (cl.scores[i].qw_userid == uid || !strcasecmp(cl.scores[i].name, Cmd_Argv(cmd, 1)))
369 {
371 return;
372 }
373 }
374 Con_Printf ("User not in server.\n");
375}
char name[MAX_SCOREBOARDNAME]
Definition client.h:489
int qw_userid
Definition client.h:493
char qw_userinfo[MAX_USERINFO_STRING]
Definition client.h:494

References cl, cmd(), Cmd_Argc(), Cmd_Argv(), Con_Printf(), i, InfoString_Print(), client_state_t::maxclients, scoreboard_t::name, scoreboard_t::qw_userid, scoreboard_t::qw_userinfo, and client_state_t::scores.

Referenced by CL_InitCommands().

◆ CL_Users_f()

static void CL_Users_f ( cmd_state_t * cmd)
static

Definition at line 384 of file cl_cmd.c.

385{
386 int i;
387 int c;
388
389 c = 0;
390 Con_Printf ("userid frags name\n");
391 Con_Printf ("------ ----- ----\n");
392 for (i = 0;i < cl.maxclients;i++)
393 {
394 if (cl.scores[i].name[0])
395 {
396 Con_Printf ("%6i %4i %s\n", cl.scores[i].qw_userid, cl.scores[i].frags, cl.scores[i].name);
397 c++;
398 }
399 }
400
401 Con_Printf ("%i total users\n", c);
402}

References cl, Con_Printf(), scoreboard_t::frags, i, client_state_t::maxclients, scoreboard_t::name, scoreboard_t::qw_userid, and client_state_t::scores.

Referenced by CL_InitCommands().

Variable Documentation

◆ cl_bottomcolor

cvar_t cl_bottomcolor = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "bottomcolor", "0", "color of your pants"}

Definition at line 36 of file cl_cmd.c.

36{CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "bottomcolor", "0", "color of your pants"};
#define CF_USERINFO
command or cvar used to communicate userinfo to the server
Definition cmd.h:57
#define CF_ARCHIVE
cvar should have its set value saved to config.cfg and persist across sessions
Definition cmd.h:53

Referenced by CL_Color_c(), CL_Color_f(), CL_InitCommands(), CL_SendPlayerInfo(), CL_SetInfo(), CL_Topcolor_c(), and M_Menu_Setup_f().

◆ cl_color

cvar_t cl_color = {CF_CLIENT | CF_ARCHIVE, "_cl_color", "0", "internal storage cvar for current player colors (changed by color command)"}

Definition at line 252 of file cl_cmd.c.

252{CF_CLIENT | CF_ARCHIVE, "_cl_color", "0", "internal storage cvar for current player colors (changed by color command)"};

Referenced by CL_Bottomcolor_c(), CL_InitCommands(), and CL_Topcolor_c().

◆ cl_name

cvar_t cl_name = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "_cl_name", "player", "player name"}

User-visible names of these CF_USERINFO cvars must be matched in CL_SetInfo()!

Definition at line 32 of file cl_cmd.c.

32{CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "_cl_name", "player", "player name"};

Referenced by CL_InitCommands(), CL_Name_f(), CL_SendPlayerInfo(), M_Menu_Setup_f(), M_Setup_Key(), and SV_Kick_f().

◆ cl_noaim

cvar_t cl_noaim = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "noaim", "1", "QW option to disable vertical autoaim"}

Definition at line 39 of file cl_cmd.c.

39{CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "noaim", "1", "QW option to disable vertical autoaim"};

Referenced by CL_InitCommands().

◆ cl_pmodel

cvar_t cl_pmodel = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "pmodel", "0", "current player model number in nehahra"}

Definition at line 40 of file cl_cmd.c.

40{CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "pmodel", "0", "current player model number in nehahra"};

Referenced by CL_InitCommands(), and CL_SendPlayerInfo().

◆ cl_rate

cvar_t cl_rate = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate", "20000", "connection speed"}

Definition at line 33 of file cl_cmd.c.

33{CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate", "20000", "connection speed"};

Referenced by CL_InitCommands(), CL_SendMove(), CL_SendPlayerInfo(), M_Menu_Setup_f(), NetConn_ReceivedMessage(), and SCR_DrawNetGraph().

◆ cl_rate_burstsize

cvar_t cl_rate_burstsize = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate_burstsize", "1024", "rate control burst size"}

Definition at line 34 of file cl_cmd.c.

34{CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate_burstsize", "1024", "rate control burst size"};

Referenced by CL_InitCommands(), CL_SendMove(), CL_SendPlayerInfo(), and NetConn_ReceivedMessage().

◆ cl_skin

cvar_t cl_skin = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "skin", "", "QW player skin name (example: base)"}

Definition at line 38 of file cl_cmd.c.

38{CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "skin", "", "QW player skin name (example: base)"};

Referenced by CL_InitCommands().

◆ cl_team

cvar_t cl_team = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "team", "none", "QW team (4 character limit, example: blue)"}

Definition at line 37 of file cl_cmd.c.

37{CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "team", "none", "QW team (4 character limit, example: blue)"};

Referenced by CL_InitCommands().

◆ cl_topcolor

cvar_t cl_topcolor = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "topcolor", "0", "color of your shirt"}

Definition at line 35 of file cl_cmd.c.

35{CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "topcolor", "0", "color of your shirt"};

Referenced by CL_Bottomcolor_c(), CL_Color_c(), CL_Color_f(), CL_InitCommands(), CL_SendPlayerInfo(), CL_SetInfo(), and M_Menu_Setup_f().

◆ r_fixtrans_auto

cvar_t r_fixtrans_auto = {CF_CLIENT, "r_fixtrans_auto", "0", "automatically fixtrans textures (when set to 2, it also saves the fixed versions to a fixtrans directory)"}

Definition at line 42 of file cl_cmd.c.

42{CF_CLIENT, "r_fixtrans_auto", "0", "automatically fixtrans textures (when set to 2, it also saves the fixed versions to a fixtrans directory)"};

Referenced by CL_InitCommands(), and loadimagepixelsbgra().

◆ rcon_secure

cvar_t rcon_secure
extern

Definition at line 90 of file console.c.

90{CF_CLIENT | CF_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"};

Referenced by CL_PQRcon_f(), and CL_Rcon_f().

◆ rcon_secure_challengetimeout

cvar_t rcon_secure_challengetimeout
extern

Definition at line 91 of file console.c.

91{CF_CLIENT, "rcon_secure_challengetimeout", "5", "challenge-based secure rcon: time out requests if no challenge came within this time interval"};

Referenced by CL_Rcon_f().