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.
23 // for secure rcon authentication
29 #include "cl_collision.h"
31 cvar_t cl_name = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "name", "player", "change your player name"};
32 cvar_t cl_rate = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate", "20000", "change your connection speed"};
33 cvar_t cl_rate_burstsize = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "rate_burstsize", "1024", "internal storage cvar for current rate control burst size (changed by rate_burstsize command)"};
34 cvar_t cl_topcolor = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "topcolor", "0", "change the color of your shirt"};
35 cvar_t cl_bottomcolor = {CF_CLIENT | CF_ARCHIVE | CF_USERINFO, "bottomcolor", "0", "change the color of your pants"};
36 cvar_t cl_team = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "team", "none", "QW team (4 character limit, example: blue)"};
37 cvar_t cl_skin = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "skin", "", "QW player skin name (example: base)"};
38 cvar_t cl_noaim = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "noaim", "1", "QW option to disable vertical autoaim"};
39 cvar_t cl_pmodel = {CF_CLIENT | CF_USERINFO | CF_ARCHIVE, "pmodel", "0", "current player model number in nehahra"};
40 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)"};
42 extern cvar_t rcon_secure;
43 extern cvar_t rcon_secure_challengetimeout;
49 Sends an entire command string over to the server, unprocessed
52 void CL_ForwardToServer (const char *s)
55 if (cls.state != ca_connected)
57 Con_Printf("Can't \"%s\", not connected\n", s);
64 // LadyHavoc: thanks to Fuh for bringing the pure evil of SZ_Print to my
65 // attention, it has been eradicated from here, its only (former) use in
67 if (cls.protocol == PROTOCOL_QUAKEWORLD)
68 MSG_WriteByte(&cls.netcon->message, qw_clc_stringcmd);
70 MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
71 if ((!strncmp(s, "say ", 4) || !strncmp(s, "say_team ", 9)) && cl_locs_enable.integer)
73 // say/say_team commands can replace % character codes with status info
76 if (*s == '%' && s[1])
78 // handle proquake message macros
82 case 'l': // current location
83 CL_Locs_FindLocationName(temp, sizeof(temp), cl.movement_origin);
85 case 'h': // current health
86 dpsnprintf(temp, sizeof(temp), "%i", cl.stats[STAT_HEALTH]);
88 case 'a': // current armor
89 dpsnprintf(temp, sizeof(temp), "%i", cl.stats[STAT_ARMOR]);
91 case 'x': // current rockets
92 dpsnprintf(temp, sizeof(temp), "%i", cl.stats[STAT_ROCKETS]);
94 case 'c': // current cells
95 dpsnprintf(temp, sizeof(temp), "%i", cl.stats[STAT_CELLS]);
97 // silly proquake macros
98 case 'd': // loc at last death
99 CL_Locs_FindLocationName(temp, sizeof(temp), cl.lastdeathorigin);
101 case 't': // current time
102 dpsnprintf(temp, sizeof(temp), "%.0f:%.0f", floor(cl.time / 60), cl.time - floor(cl.time / 60) * 60);
104 case 'r': // rocket launcher status ("I have RL", "I need rockets", "I need RL")
105 if (!(cl.stats[STAT_ITEMS] & IT_ROCKET_LAUNCHER))
106 dpsnprintf(temp, sizeof(temp), "I need RL");
107 else if (!cl.stats[STAT_ROCKETS])
108 dpsnprintf(temp, sizeof(temp), "I need rockets");
110 dpsnprintf(temp, sizeof(temp), "I have RL");
112 case 'p': // powerup status (outputs "quad" "pent" and "eyes" according to status)
113 if (cl.stats[STAT_ITEMS] & IT_QUAD)
116 strlcat(temp, " ", sizeof(temp));
117 strlcat(temp, "quad", sizeof(temp));
119 if (cl.stats[STAT_ITEMS] & IT_INVULNERABILITY)
122 strlcat(temp, " ", sizeof(temp));
123 strlcat(temp, "pent", sizeof(temp));
125 if (cl.stats[STAT_ITEMS] & IT_INVISIBILITY)
128 strlcat(temp, " ", sizeof(temp));
129 strlcat(temp, "eyes", sizeof(temp));
132 case 'w': // weapon status (outputs "SSG:NG:SNG:GL:RL:LG" with the text between : characters omitted if you lack the weapon)
133 if (cl.stats[STAT_ITEMS] & IT_SUPER_SHOTGUN)
134 strlcat(temp, "SSG", sizeof(temp));
135 strlcat(temp, ":", sizeof(temp));
136 if (cl.stats[STAT_ITEMS] & IT_NAILGUN)
137 strlcat(temp, "NG", sizeof(temp));
138 strlcat(temp, ":", sizeof(temp));
139 if (cl.stats[STAT_ITEMS] & IT_SUPER_NAILGUN)
140 strlcat(temp, "SNG", sizeof(temp));
141 strlcat(temp, ":", sizeof(temp));
142 if (cl.stats[STAT_ITEMS] & IT_GRENADE_LAUNCHER)
143 strlcat(temp, "GL", sizeof(temp));
144 strlcat(temp, ":", sizeof(temp));
145 if (cl.stats[STAT_ITEMS] & IT_ROCKET_LAUNCHER)
146 strlcat(temp, "RL", sizeof(temp));
147 strlcat(temp, ":", sizeof(temp));
148 if (cl.stats[STAT_ITEMS] & IT_LIGHTNING)
149 strlcat(temp, "LG", sizeof(temp));
152 // not a recognized macro, print it as-is...
158 // write the resulting text
159 SZ_Write(&cls.netcon->message, (unsigned char *)temp, (int)strlen(temp));
163 MSG_WriteByte(&cls.netcon->message, *s);
166 MSG_WriteByte(&cls.netcon->message, 0);
168 else // any other command is passed on as-is
169 SZ_Write(&cls.netcon->message, (const unsigned char *)s, (int)strlen(s) + 1);
172 void CL_ForwardToServer_f (cmd_state_t *cmd)
175 char vabuf[MAX_INPUTLINE];
177 if (!strcasecmp(Cmd_Argv(cmd, 0), "cmd"))
179 // we want to strip off "cmd", so just send the args
180 s = Cmd_Argc(cmd) > 1 ? Cmd_Args(cmd) : "";
184 // we need to keep the command name, so send Cmd_Argv(cmd, 0), a space and then Cmd_Args(cmd)
185 i = dpsnprintf(vabuf, sizeof(vabuf), "%s", Cmd_Argv(cmd, 0));
186 if(Cmd_Argc(cmd) > 1)
187 // (i + 1) accounts for the added space
188 dpsnprintf(&vabuf[i], sizeof(vabuf) - (i + 1), " %s", Cmd_Args(cmd));
191 // don't send an empty forward message if the user tries "cmd" by itself
194 CL_ForwardToServer(s);
197 static void CL_SendCvar_f(cmd_state_t *cmd)
200 const char *cvarname;
203 if(Cmd_Argc(cmd) != 2)
205 cvarname = Cmd_Argv(cmd, 1);
206 if (cls.state == ca_connected)
208 c = Cvar_FindVar(&cvars_all, cvarname, CF_CLIENT | CF_SERVER);
209 // LadyHavoc: if there is no such cvar or if it is private, send a
210 // reply indicating that it has no value
211 if(!c || (c->flags & CF_PRIVATE))
212 CL_ForwardToServer(va(vabuf, sizeof(vabuf), "sentcvar %s", cvarname));
214 CL_ForwardToServer(va(vabuf, sizeof(vabuf), "sentcvar %s \"%s\"", c->name, c->string));
224 cvar_t cl_color = {CF_CLIENT | CF_ARCHIVE, "_cl_color", "0", "internal storage cvar for current player colors (changed by color command)"};
226 // Ignore the callbacks so this two-to-three way synchronization doesn't cause an infinite loop.
227 static void CL_Color_c(cvar_t *var)
231 Cvar_Set_NoCallback(&cl_topcolor, va(vabuf, sizeof(vabuf), "%i", ((var->integer >> 4) & 15)));
232 Cvar_Set_NoCallback(&cl_bottomcolor, va(vabuf, sizeof(vabuf), "%i", (var->integer & 15)));
235 static void CL_Topcolor_c(cvar_t *var)
239 Cvar_Set_NoCallback(&cl_color, va(vabuf, sizeof(vabuf), "%i", var->integer*16 + cl_bottomcolor.integer));
242 static void CL_Bottomcolor_c(cvar_t *var)
246 Cvar_Set_NoCallback(&cl_color, va(vabuf, sizeof(vabuf), "%i", cl_topcolor.integer*16 + var->integer));
249 static void CL_Color_f(cmd_state_t *cmd)
253 if (Cmd_Argc(cmd) == 1)
255 if (cmd->source == src_local)
257 Con_Printf("\"color\" is \"%i %i\"\n", cl_topcolor.integer, cl_bottomcolor.integer);
258 Con_Print("color <0-15> [0-15]\n");
263 if (Cmd_Argc(cmd) == 2)
264 top = bottom = atoi(Cmd_Argv(cmd, 1));
267 top = atoi(Cmd_Argv(cmd, 1));
268 bottom = atoi(Cmd_Argv(cmd, 2));
271 * This is just a convenient way to change topcolor and bottomcolor
272 * We can't change cl_color from here directly because topcolor and
273 * bottomcolor may be changed separately and do not call this function.
274 * So it has to be changed when the userinfo strings are updated, which
275 * happens twice here. Perhaps find a cleaner way?
278 top = top >= 0 ? top : cl_topcolor.integer;
279 bottom = bottom >= 0 ? bottom : cl_bottomcolor.integer;
284 // LadyHavoc: allowing skin colormaps 14 and 15 by commenting this out
290 if (cmd->source == src_local)
292 Cvar_SetValueQuick(&cl_topcolor, top);
293 Cvar_SetValueQuick(&cl_bottomcolor, bottom);
302 user <name or userid>
304 Dump userdata / masterdata for a user
307 static void CL_User_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
312 if (Cmd_Argc(cmd) != 2)
314 Con_Printf ("Usage: user <username / userid>\n");
318 uid = atoi(Cmd_Argv(cmd, 1));
320 for (i = 0;i < cl.maxclients;i++)
322 if (!cl.scores[i].name[0])
324 if (cl.scores[i].qw_userid == uid || !strcasecmp(cl.scores[i].name, Cmd_Argv(cmd, 1)))
326 InfoString_Print(cl.scores[i].qw_userinfo);
330 Con_Printf ("User not in server.\n");
337 Dump userids for all current players
340 static void CL_Users_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
346 Con_Printf ("userid frags name\n");
347 Con_Printf ("------ ----- ----\n");
348 for (i = 0;i < cl.maxclients;i++)
350 if (cl.scores[i].name[0])
352 Con_Printf ("%6i %4i %s\n", cl.scores[i].qw_userid, cl.scores[i].frags, cl.scores[i].name);
357 Con_Printf ("%i total users\n", c);
364 packet <destination> <contents>
366 Contents allows \n escape character
369 static void CL_Packet_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
375 lhnetaddress_t address;
376 lhnetsocket_t *mysocket;
378 if (Cmd_Argc(cmd) != 3)
380 Con_Printf ("packet <destination> <contents>\n");
384 if (!LHNETADDRESS_FromString (&address, Cmd_Argv(cmd, 1), sv_netport.integer))
386 Con_Printf ("Bad address\n");
390 in = Cmd_Argv(cmd, 2);
392 send[0] = send[1] = send[2] = send[3] = -1;
394 l = (int)strlen (in);
395 for (i=0 ; i<l ; i++)
397 if (out >= send + sizeof(send) - 1)
399 if (in[i] == '\\' && in[i+1] == 'n')
404 else if (in[i] == '\\' && in[i+1] == '0')
409 else if (in[i] == '\\' && in[i+1] == 't')
414 else if (in[i] == '\\' && in[i+1] == 'r')
419 else if (in[i] == '\\' && in[i+1] == '"')
428 mysocket = NetConn_ChooseClientSocketForAddress(&address);
430 mysocket = NetConn_ChooseServerSocketForAddress(&address);
432 NetConn_Write(mysocket, send, out - send, &address);
436 =====================
439 ProQuake rcon support
440 =====================
442 static void CL_PQRcon_f(cmd_state_t *cmd)
446 lhnetsocket_t *mysocket;
448 if (Cmd_Argc(cmd) == 1)
450 Con_Printf("%s: Usage: %s command\n", Cmd_Argv(cmd, 0), Cmd_Argv(cmd, 0));
454 if (!rcon_password.string || !rcon_password.string[0] || rcon_secure.integer > 0)
456 Con_Printf ("You must set rcon_password before issuing an pqrcon command, and rcon_secure must be 0.\n");
460 e = strchr(rcon_password.string, ' ');
461 n = e ? e-rcon_password.string : (int)strlen(rcon_password.string);
464 cls.rcon_address = cls.netcon->peeraddress;
467 if (!rcon_address.string[0])
469 Con_Printf ("You must either be connected, or set the rcon_address cvar to issue rcon commands\n");
472 LHNETADDRESS_FromString(&cls.rcon_address, rcon_address.string, sv_netport.integer);
474 mysocket = NetConn_ChooseClientSocketForAddress(&cls.rcon_address);
478 unsigned char bufdata[64];
481 MSG_WriteLong(&buf, 0);
482 MSG_WriteByte(&buf, CCREQ_RCON);
483 SZ_Write(&buf, (const unsigned char*)rcon_password.string, n);
484 MSG_WriteByte(&buf, 0); // terminate the (possibly partial) string
485 MSG_WriteString(&buf, Cmd_Args(cmd));
486 StoreBigLong(buf.data, NETFLAG_CTL | (buf.cursize & NETFLAG_LENGTH_MASK));
487 NetConn_Write(mysocket, buf.data, buf.cursize, &cls.rcon_address);
493 =====================
496 Send the rest of the command line over as
497 an unconnected command.
498 =====================
500 static void CL_Rcon_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
504 lhnetsocket_t *mysocket;
506 if (Cmd_Argc(cmd) == 1)
508 Con_Printf("%s: Usage: %s command\n", Cmd_Argv(cmd, 0), Cmd_Argv(cmd, 0));
512 if (!rcon_password.string || !rcon_password.string[0])
514 Con_Printf ("You must set rcon_password before issuing an rcon command.\n");
518 e = strchr(rcon_password.string, ' ');
519 n = e ? e-rcon_password.string : (int)strlen(rcon_password.string);
522 cls.rcon_address = cls.netcon->peeraddress;
525 if (!rcon_address.string[0])
527 Con_Printf ("You must either be connected, or set the rcon_address cvar to issue rcon commands\n");
530 LHNETADDRESS_FromString(&cls.rcon_address, rcon_address.string, sv_netport.integer);
532 mysocket = NetConn_ChooseClientSocketForAddress(&cls.rcon_address);
533 if (mysocket && Cmd_Args(cmd)[0])
535 // simply put together the rcon packet and send it
536 if(Cmd_Argv(cmd, 0)[0] == 's' || rcon_secure.integer > 1)
538 if(cls.rcon_commands[cls.rcon_ringpos][0])
541 LHNETADDRESS_ToString(&cls.rcon_addresses[cls.rcon_ringpos], s, sizeof(s), true);
542 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]);
543 cls.rcon_commands[cls.rcon_ringpos][0] = 0;
546 for (i = 0;i < MAX_RCONS;i++)
547 if(cls.rcon_commands[i][0])
548 if (!LHNETADDRESS_Compare(&cls.rcon_address, &cls.rcon_addresses[i]))
552 NetConn_WriteString(mysocket, "\377\377\377\377getchallenge", &cls.rcon_address); // otherwise we'll request the challenge later
553 strlcpy(cls.rcon_commands[cls.rcon_ringpos], Cmd_Args(cmd), sizeof(cls.rcon_commands[cls.rcon_ringpos]));
554 cls.rcon_addresses[cls.rcon_ringpos] = cls.rcon_address;
555 cls.rcon_timeout[cls.rcon_ringpos] = host.realtime + rcon_secure_challengetimeout.value;
556 cls.rcon_ringpos = (cls.rcon_ringpos + 1) % MAX_RCONS;
558 else if(rcon_secure.integer > 0)
562 dpsnprintf(argbuf, sizeof(argbuf), "%ld.%06d %s", (long) time(NULL), (int) (rand() % 1000000), Cmd_Args(cmd));
563 memcpy(buf, "\377\377\377\377srcon HMAC-MD4 TIME ", 24);
564 if(HMAC_MDFOUR_16BYTES((unsigned char *) (buf + 24), (unsigned char *) argbuf, (int)strlen(argbuf), (unsigned char *) rcon_password.string, n))
567 strlcpy(buf + 41, argbuf, sizeof(buf) - 41);
568 NetConn_Write(mysocket, buf, 41 + (int)strlen(buf + 41), &cls.rcon_address);
574 memcpy(buf, "\377\377\377\377", 4);
575 dpsnprintf(buf+4, sizeof(buf)-4, "rcon %.*s %s", n, rcon_password.string, Cmd_Args(cmd));
576 NetConn_WriteString(mysocket, buf, &cls.rcon_address);
585 Sent by server when serverinfo changes
588 // TODO: shouldn't this be a cvar instead?
589 static void CL_FullServerinfo_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
592 if (Cmd_Argc(cmd) != 2)
594 Con_Printf ("usage: fullserverinfo <complete info string>\n");
598 strlcpy (cl.qw_serverinfo, Cmd_Argv(cmd, 1), sizeof(cl.qw_serverinfo));
599 InfoString_GetValue(cl.qw_serverinfo, "teamplay", temp, sizeof(temp));
600 cl.qw_teamplay = atoi(temp);
607 Allow clients to change userinfo
611 static void CL_FullInfo_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
617 if (Cmd_Argc(cmd) != 2)
619 Con_Printf ("fullinfo <complete info string>\n");
623 s = Cmd_Argv(cmd, 1);
628 size_t len = strcspn(s, "\\");
629 if (len >= sizeof(key)) {
630 len = sizeof(key) - 1;
632 strlcpy(key, s, len + 1);
636 Con_Printf ("MISSING VALUE\n");
639 ++s; // Skip over backslash.
641 len = strcspn(s, "\\");
642 if (len >= sizeof(value)) {
643 len = sizeof(value) - 1;
645 strlcpy(value, s, len + 1);
647 CL_SetInfo(key, value, false, false, false, false);
654 ++s; // Skip over backslash.
662 Allow clients to change userinfo
665 static void CL_SetInfo_f(cmd_state_t *cmd) // credit: taken from QuakeWorld
667 if (Cmd_Argc(cmd) == 1)
669 InfoString_Print(cls.userinfo);
672 if (Cmd_Argc(cmd) != 3)
674 Con_Printf ("usage: setinfo [ <key> <value> ]\n");
677 CL_SetInfo(Cmd_Argv(cmd, 1), Cmd_Argv(cmd, 2), true, false, false, false);
680 static void CL_PingPLReport_f(cmd_state_t *cmd)
684 int l = Cmd_Argc(cmd);
685 if (l > cl.maxclients)
687 for (i = 0;i < l;i++)
689 cl.scores[i].qw_ping = atoi(Cmd_Argv(cmd, 1+i*2));
690 cl.scores[i].qw_packetloss = strtol(Cmd_Argv(cmd, 1+i*2+1), &errbyte, 0);
691 if(errbyte && *errbyte == ',')
692 cl.scores[i].qw_movementloss = atoi(errbyte + 1);
694 cl.scores[i].qw_movementloss = 0;
698 void CL_InitCommands(void)
700 dpsnprintf(cls.userinfo, sizeof(cls.userinfo), "\\name\\player\\team\\none\\topcolor\\0\\bottomcolor\\0\\rate\\10000\\msg\\1\\noaim\\1\\*ver\\dp");
702 Cvar_RegisterVariable(&cl_name);
703 Cvar_RegisterAlias(&cl_name, "_cl_name");
704 Cvar_RegisterVariable(&cl_rate);
705 Cvar_RegisterAlias(&cl_rate, "_cl_rate");
706 Cvar_RegisterVariable(&cl_rate_burstsize);
707 Cvar_RegisterAlias(&cl_rate_burstsize, "_cl_rate_burstsize");
708 Cvar_RegisterVariable(&cl_pmodel);
709 Cvar_RegisterAlias(&cl_pmodel, "_cl_pmodel");
710 Cvar_RegisterVariable(&cl_color);
711 Cvar_RegisterCallback(&cl_color, CL_Color_c);
712 Cvar_RegisterVariable(&cl_topcolor);
713 Cvar_RegisterCallback(&cl_topcolor, CL_Topcolor_c);
714 Cvar_RegisterVariable(&cl_bottomcolor);
715 Cvar_RegisterCallback(&cl_bottomcolor, CL_Bottomcolor_c);
716 Cvar_RegisterVariable(&r_fixtrans_auto);
717 Cvar_RegisterVariable(&cl_team);
718 Cvar_RegisterVariable(&cl_skin);
719 Cvar_RegisterVariable(&cl_noaim);
721 Cmd_AddCommand(CF_CLIENT | CF_CLIENT_FROM_SERVER, "cmd", CL_ForwardToServer_f, "send a console commandline to the server (used by some mods)");
722 Cmd_AddCommand(CF_CLIENT, "color", CL_Color_f, "change your player shirt and pants colors");
723 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");
724 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");
725 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)");
726 Cmd_AddCommand(CF_SHARED, "user", CL_User_f, "prints additional information about a player number or name on the scoreboard");
727 Cmd_AddCommand(CF_SHARED, "users", CL_Users_f, "prints additional information about all players on the scoreboard");
728 Cmd_AddCommand(CF_CLIENT, "packet", CL_Packet_f, "send a packet to the specified address:port containing a text string");
729 Cmd_AddCommand(CF_CLIENT, "fullinfo", CL_FullInfo_f, "allows client to modify their userinfo");
730 Cmd_AddCommand(CF_CLIENT, "setinfo", CL_SetInfo_f, "modifies your userinfo");
731 Cmd_AddCommand(CF_CLIENT, "sendcvar", CL_SendCvar_f, "sends the value of a cvar to the server as a sentcvar command, for use by QuakeC");
732 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)");
734 // commands that are only sent by server to client for execution
735 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)");
736 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");