host_cmd.c: minor tidy up, nothing serious.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@318 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-08-31 12:15:38 +00:00
parent 7271fcb9fe
commit 3e1087164e

View file

@ -1280,9 +1280,9 @@ void Host_Version_f (void)
void Host_Say(qboolean teamonly) void Host_Say(qboolean teamonly)
{ {
int j;
client_t *client; client_t *client;
client_t *save; client_t *save;
int j;
const char *p; const char *p;
char text[MAXCMDLINE], *p2; char text[MAXCMDLINE], *p2;
qboolean quoted; qboolean quoted;
@ -1310,7 +1310,7 @@ void Host_Say(qboolean teamonly)
p = Cmd_Args(); p = Cmd_Args();
// remove quotes if present // remove quotes if present
quoted = false; quoted = false;
if (*p == '"') if (*p == '\"')
{ {
p++; p++;
quoted = true; quoted = true;
@ -1322,7 +1322,7 @@ void Host_Say(qboolean teamonly)
q_snprintf (text, sizeof(text), "\001<%s> %s", hostname.string, p); q_snprintf (text, sizeof(text), "\001<%s> %s", hostname.string, p);
// check length & truncate if necessary // check length & truncate if necessary
j = Q_strlen(text); j = strlen(text);
if (j >= sizeof(text) - 1) if (j >= sizeof(text) - 1)
{ {
text[sizeof(text) - 2] = '\n'; text[sizeof(text) - 2] = '\n';
@ -1373,9 +1373,9 @@ void Host_Say_Team_f(void)
void Host_Tell_f(void) void Host_Tell_f(void)
{ {
int j;
client_t *client; client_t *client;
client_t *save; client_t *save;
int j;
const char *p; const char *p;
char text[MAXCMDLINE], *p2; char text[MAXCMDLINE], *p2;
qboolean quoted; qboolean quoted;
@ -1392,7 +1392,7 @@ void Host_Tell_f(void)
p = Cmd_Args(); p = Cmd_Args();
// remove quotes if present // remove quotes if present
quoted = false; quoted = false;
if (*p == '"') if (*p == '\"')
{ {
p++; p++;
quoted = true; quoted = true;
@ -1400,7 +1400,7 @@ void Host_Tell_f(void)
q_snprintf (text, sizeof(text), "%s: %s", host_client->name, p); q_snprintf (text, sizeof(text), "%s: %s", host_client->name, p);
// check length & truncate if necessary // check length & truncate if necessary
j = Q_strlen(text); j = strlen(text);
if (j >= sizeof(text) - 1) if (j >= sizeof(text) - 1)
{ {
text[sizeof(text) - 2] = '\n'; text[sizeof(text) - 2] = '\n';