1
0
Fork 0
forked from fte/fteqw

stripped out my ancient form of in-engine translation. Implemented gettext style translation instead. Automatically determine language from environment settings.

try to imitate cyrillic chars if the charset doesn't support them using koi8 mappings, so russian-speaking users don't get so easily pissed about not knowing how to select a font that actually contains chars for their language.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4544 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-11-29 14:36:47 +00:00
parent e4757aedf6
commit 87564c9d79
44 changed files with 697 additions and 1623 deletions

View file

@ -480,7 +480,7 @@ void CL_SendConnectPacket (int mtu,
if (!NET_StringToAdr (cls.servername, PORT_QWSERVER, &adr))
{
Con_TPrintf (TLC_BADSERVERADDRESS);
Con_TPrintf ("Bad server address\n");
connect_time = -1;
return;
}
@ -490,7 +490,7 @@ void CL_SendConnectPacket (int mtu,
if (!NET_IsClientLegal(&adr))
{
Con_TPrintf (TLC_ILLEGALSERVERADDRESS);
Con_TPrintf ("Illegal server address\n");
connect_time = -1;
return;
}
@ -724,7 +724,7 @@ void CL_CheckForResend (void)
{
if (!NET_StringToAdr (cls.servername, connect_defaultport, &adr))
{
Con_TPrintf (TLC_BADSERVERADDRESS);
Con_TPrintf ("Bad server address\n");
connect_time = -1;
SCR_EndLoadingPlaque();
return;
@ -794,14 +794,14 @@ void CL_CheckForResend (void)
t1 = Sys_DoubleTime ();
if (!NET_StringToAdr (cls.servername, connect_defaultport, &adr))
{
Con_TPrintf (TLC_BADSERVERADDRESS);
Con_TPrintf ("Bad server address\n");
connect_time = -1;
SCR_EndLoadingPlaque();
return;
}
if (!NET_IsClientLegal(&adr))
{
Con_TPrintf (TLC_ILLEGALSERVERADDRESS);
Con_TPrintf ("Illegal server address\n");
SCR_EndLoadingPlaque();
connect_time = -1;
return;
@ -822,7 +822,7 @@ void CL_CheckForResend (void)
CLQ3_SendAuthPacket(&adr);
#endif
Con_TPrintf (TLC_CONNECTINGTO, cls.servername);
Con_TPrintf ("Connecting to %s...\n", cls.servername);
if (connect_tries == 0)
if (!NET_EnsureRoute(cls.sockets, "conn", cls.servername, false))
@ -895,7 +895,7 @@ void CL_BeginServerReconnect(void)
#ifndef CLIENTONLY
if (isDedicated)
{
Con_TPrintf (TLC_DEDICATEDCANNOTCONNECT);
Con_TPrintf ("Connect ignored - dedicated. set a renderer first\n");
return;
}
#endif
@ -914,7 +914,7 @@ void CL_Connect_f (void)
if (Cmd_Argc() != 2)
{
Con_TPrintf (TLC_SYNTAX_CONNECT);
Con_TPrintf ("usage: connect <server>\n");
return;
}
@ -989,7 +989,7 @@ void CLNQ_Connect_f (void)
if (Cmd_Argc() != 2)
{
Con_TPrintf (TLC_SYNTAX_CONNECT);
Con_TPrintf ("usage: connect <server>\n");
return;
}
@ -1047,8 +1047,8 @@ void CL_Rcon_f (void)
{
if (Cmd_Argc() < 3)
{
Con_TPrintf (TLC_NORCONPASSWORD);
Con_Printf("usage: rcon (password) <command>\n");
Con_TPrintf ("'rcon_password' is not set.\n");
Con_TPrintf("usage: rcon (password) <command>\n");
return;
}
password = Cmd_Argv(1);
@ -1085,7 +1085,7 @@ void CL_Rcon_f (void)
{
if (!strlen(rcon_address.string))
{
Con_TPrintf (TLC_NORCONDEST);
Con_TPrintf ("You must either be connected,\nor set the 'rcon_address' cvar\nto issue rcon commands\n");
return;
}
@ -1392,7 +1392,7 @@ void CL_User_f (void)
if (Cmd_Argc() != 2)
{
Con_TPrintf (TLC_SYNTAX_USER);
Con_TPrintf ("Usage: user <username / userid>\n");
return;
}
@ -1413,7 +1413,7 @@ void CL_User_f (void)
}
}
if (!found)
Con_TPrintf (TLC_USER_NOUSER);
Con_TPrintf ("User not in server.\n");
}
/*
@ -1429,18 +1429,18 @@ void CL_Users_f (void)
int c;
c = 0;
Con_TPrintf (TLC_USERBANNER);
Con_TPrintf (TLC_USERBANNER2);
Con_TPrintf ("userid frags name\n");
Con_TPrintf ("------ ----- ----\n");
for (i=0 ; i<MAX_CLIENTS ; i++)
{
if (cl.players[i].name[0])
{
Con_TPrintf (TLC_USERLINE, cl.players[i].userid, cl.players[i].frags, cl.players[i].name);
Con_TPrintf ("%6i %4i %s\n", cl.players[i].userid, cl.players[i].frags, cl.players[i].name);
c++;
}
}
Con_TPrintf (TLC_USERTOTAL, c);
Con_TPrintf ("%i total users\n", c);
}
int CL_ParseColour(char *colt)
@ -1469,10 +1469,10 @@ void CL_Color_f (void)
if (Cmd_Argc() == 1)
{
Con_TPrintf (TLC_COLOURCURRENT,
Con_TPrintf ("\"color\" is \"%s %s\"\n",
Info_ValueForKey (cls.userinfo[pnum], "topcolor"),
Info_ValueForKey (cls.userinfo[pnum], "bottomcolor") );
Con_TPrintf (TLC_SYNTAX_COLOUR);
Con_TPrintf ("usage: color <0xRRGGBB> [0xRRGGBB]\n");
return;
}
@ -1752,7 +1752,7 @@ void CL_FullServerinfo_f (void)
if (Cmd_Argc() != 2)
{
Con_TPrintf (TLC_SYNTAX_FULLSERVERINFO);
Con_TPrintf ("usage: fullserverinfo <complete info string>\n");
return;
}
@ -1762,7 +1762,7 @@ void CL_FullServerinfo_f (void)
v = Q_atof(p);
if (v) {
if (!server_version)
Con_TPrintf (TLC_SERVER_VERSION, v);
Con_TPrintf ("Version %1.2f Server\n", v);
server_version = v;
}
}
@ -1788,7 +1788,7 @@ void CL_FullInfo_f (void)
if (Cmd_Argc() != 2)
{
Con_TPrintf (TLC_SYNTAX_FULLINFO);
Con_TPrintf ("fullinfo <complete info string>\n");
return;
}
@ -1871,7 +1871,7 @@ void CL_SetInfo_f (void)
}
if (Cmd_Argc() != 3)
{
Con_TPrintf (TLC_SYNTAX_SETINFO);
Con_TPrintf ("usage: setinfo [ <key> <value> ]\n");
return;
}
if (!stricmp(Cmd_Argv(1), pmodel_name) || !strcmp(Cmd_Argv(1), emodel_name))
@ -1939,7 +1939,7 @@ void CL_Packet_f (void)
if (Cmd_Argc() != 3)
{
Con_TPrintf (TLC_PACKET_SYNTAX);
Con_TPrintf ("usage: packet <destination> <contents>\n");
return;
}
@ -2159,7 +2159,7 @@ void CL_Changing_f (void)
if (cls.state)
{
cls.state = ca_connected; // not active anymore, but not disconnected
Con_TPrintf (TLC_CHANGINGMAP);
Con_TPrintf ("\nChanging map...\n");
}
else
Con_Printf("Changing while not connected\n");
@ -2192,14 +2192,14 @@ void CL_Reconnect_f (void)
if (cls.state == ca_connected)
{
Con_TPrintf (TLC_RECONNECTING);
Con_TPrintf ("reconnecting...\n");
CL_SendClientCommand(true, "new");
return;
}
if (!*cls.servername)
{
Con_TPrintf (TLC_RECONNECT_NOSERVER);
Con_TPrintf ("No server to reconnect to...\n");
return;
}
@ -2292,7 +2292,7 @@ void CL_ConnectionlessPacket (void)
}
if (cls.demoplayback == DPB_NONE && net_from.type != NA_LOOPBACK)
Con_TPrintf (TL_ST_COLON, NET_AdrToString (adr, sizeof(adr), &net_from));
Con_Printf ("%s: ", NET_AdrToString (adr, sizeof(adr), &net_from));
// Con_DPrintf ("%s", net_message.data + 4);
if (c == S2C_CHALLENGE)
@ -2300,7 +2300,7 @@ void CL_ConnectionlessPacket (void)
static unsigned int lasttime = 0xdeadbeef;
unsigned int curtime = Sys_Milliseconds();
unsigned long pext = 0, pext2 = 0, huffcrc=0, mtu=0;
Con_TPrintf (TLC_S2C_CHALLENGE);
Con_TPrintf ("challenge\n");
s = MSG_ReadString ();
COM_Parse(s);
@ -2453,7 +2453,7 @@ void CL_ConnectionlessPacket (void)
if (!strcmp(s, "print"))
{
Con_TPrintf (TLC_A2C_PRINT);
Con_TPrintf ("print\n");
s = MSG_ReadString ();
Con_Printf ("%s", s);
@ -2480,7 +2480,7 @@ void CL_ConnectionlessPacket (void)
}
else
{
Con_TPrintf (TLC_Q2CONLESSPACKET_UNKNOWN, s);
Con_TPrintf ("unknown connectionless packet for q2: %s\n", s);
msg_readcount = c;
c = MSG_ReadByte();
}
@ -2535,11 +2535,11 @@ void CL_ConnectionlessPacket (void)
client_connect: //fixme: make function
#endif
if (net_from.type != NA_LOOPBACK)
Con_TPrintf (TLC_GOTCONNECTION);
Con_TPrintf ("connection\n");
if (cls.state >= ca_connected)
{
if (cls.demoplayback == DPB_NONE)
Con_TPrintf (TLC_DUPCONNECTION);
Con_TPrintf ("Dup connect received. Ignored.\n");
return;
}
compress = cls.netchan.compress;
@ -2554,7 +2554,7 @@ client_connect: //fixme: make function
CL_SendClientCommand(true, "new");
cls.state = ca_connected;
if (cls.netchan.remote_address.type != NA_LOOPBACK)
Con_TPrintf (TLC_CONNECTED);
Con_TPrintf ("Connected.\n");
allowremotecmd = false; // localid required now for remote cmds
total_loading_size = 100;
@ -2570,11 +2570,10 @@ client_connect: //fixme: make function
{
char cmdtext[2048];
Con_TPrintf (TLC_CONLESS_CONCMD);
if (net_from.type != net_local_cl_ipadr.type || net_from.type != NA_IP
|| ((*(unsigned *)net_from.address.ip != *(unsigned *)net_local_cl_ipadr.address.ip) && (*(unsigned *)net_from.address.ip != htonl(INADDR_LOOPBACK))))
{
Con_TPrintf (TLC_CMDFROMREMOTE);
Con_TPrintf ("Command packet from remote host. Ignored.\n");
return;
}
#ifdef _WIN32
@ -2583,6 +2582,8 @@ client_connect: //fixme: make function
#endif
s = MSG_ReadString ();
Con_TPrintf ("client command: %s\n", s);
Q_strncpyz(cmdtext, s, sizeof(cmdtext));
s = MSG_ReadString ();
@ -2592,12 +2593,14 @@ client_connect: //fixme: make function
while (*s && isspace(s[strlen(s) - 1]))
s[strlen(s) - 1] = 0;
if (!allowremotecmd && (!*localid.string || strcmp(localid.string, s))) {
if (!*localid.string) {
Con_TPrintf (TLC_LOCALID_NOTSET);
if (!allowremotecmd && (!*localid.string || strcmp(localid.string, s)))
{
if (!*localid.string)
{
Con_TPrintf ("^&C0Command packet received from local host, but no localid has been set. You may need to upgrade your server browser.\n");
return;
}
Con_TPrintf (TLC_LOCALID_BAD,
Con_TPrintf ("^&C0Invalid localid on command packet received from local host. \n|%s| != |%s|\nYou may need to reload your server browser and QuakeWorld.\n",
s, localid.string);
Cvar_Set(&localid, "");
return;
@ -2612,14 +2615,14 @@ client_connect: //fixme: make function
{
if (!strncmp(net_message.data+4, "print\n", 6))
{
Con_TPrintf (TLC_A2C_PRINT);
Con_TPrintf ("print\n");
Con_Printf ("%s", net_message.data+10);
return;
}
}
if (c == A2C_PRINT)
{
Con_TPrintf (TLC_A2C_PRINT);
Con_TPrintf ("print\n");
s = MSG_ReadString ();
Con_Printf ("%s", s);
@ -2639,7 +2642,7 @@ client_connect: //fixme: make function
return;
}
Con_TPrintf (TLC_CONLESSPACKET_UNKNOWN, c);
Con_TPrintf ("unknown connectionless packet: %c\n", c);
}
#ifdef NQPROT
@ -2663,7 +2666,7 @@ void CLNQ_ConnectionlessPacket(void)
if (cls.state >= ca_connected)
{
if (cls.demoplayback == DPB_NONE)
Con_TPrintf (TLC_DUPCONNECTION);
Con_TPrintf ("Dup connect received. Ignored.\n");
return;
}
port = htons((unsigned short)MSG_ReadLong());
@ -2696,7 +2699,7 @@ void CLNQ_ConnectionlessPacket(void)
cls.netchan.compress = 0;
cls.protocol = CP_NETQUAKE;
cls.state = ca_connected;
Con_TPrintf (TLC_CONNECTED);
Con_TPrintf ("Connected.\n");
total_loading_size = 100;
current_loading_size = 0;
@ -2769,7 +2772,7 @@ void CL_ReadPackets (void)
if (net_message.cursize < 6 && (cls.demoplayback != DPB_MVD && cls.demoplayback != DPB_EZTV)) //MVDs don't have the whole sequence header thing going on
{
Con_TPrintf (TL_RUNTPACKET,NET_AdrToString(adr, sizeof(adr), &net_from));
Con_TPrintf ("%s: Runt packet\n", NET_AdrToString(adr, sizeof(adr), &net_from));
continue;
}
@ -2867,7 +2870,7 @@ void CL_ReadPackets (void)
if (!sv.state)
#endif
{
Con_TPrintf (TLC_SERVERTIMEOUT);
Con_TPrintf ("\nServer connection timed out.\n");
CL_Disconnect ();
return;
}
@ -2937,19 +2940,19 @@ void CL_Download_f (void)
if ((cls.state == ca_disconnected || cls.demoplayback) && cls.demoplayback != DPB_EZTV)
{
Con_TPrintf (TLC_CONNECTFIRST);
Con_TPrintf ("Must be connected.\n");
return;
}
if (cls.netchan.remote_address.type == NA_LOOPBACK)
{
Con_TPrintf (TLC_CONNECTFIRST);
Con_TPrintf ("Must be connected.\n");
return;
}
if (Cmd_Argc() != 2)
{
Con_TPrintf (TLC_SYNTAX_DOWNLOAD);
Con_TPrintf ("Usage: download <datafile>\n");
return;
}
@ -3457,7 +3460,7 @@ void VARGS Host_EndGame (char *message, ...)
va_start (argptr,message);
vsnprintf (string,sizeof(string)-1, message,argptr);
va_end (argptr);
Con_TPrintf (TLC_CLIENTCON_ERROR_ENDGAME, string);
Con_TPrintf ("^&C0Host_EndGame: %s\n", string);
Con_Printf ("\n");
SCR_EndLoadingPlaque();
@ -3491,7 +3494,7 @@ void VARGS Host_Error (char *error, ...)
va_start (argptr,error);
vsnprintf (string,sizeof(string)-1, error,argptr);
va_end (argptr);
Con_TPrintf (TLC_HOSTFATALERROR, string);
Con_TPrintf ("Host_Error: %s\n", string);
CL_Disconnect ();
cls.demonum = -1;
@ -3520,7 +3523,7 @@ void Host_WriteConfiguration (void)
{
if (strchr(cfg_save_name.string, '.'))
{
Con_TPrintf (TLC_CONFIGCFG_WRITEFAILED);
Con_TPrintf ("Couldn't write config.cfg.\n");
return;
}
@ -3529,7 +3532,7 @@ void Host_WriteConfiguration (void)
f = FS_OpenVFS(savename, "wb", FS_GAMEONLY);
if (!f)
{
Con_TPrintf (TLC_CONFIGCFG_WRITEFAILED);
Con_TPrintf ("Couldn't write config.cfg.\n");
return;
}
@ -4317,7 +4320,7 @@ void CL_StartCinematicOrMenu(void)
UI_Start();
#endif
Con_TPrintf (TLC_QUAKEWORLD_INITED, *fs_gamename.string?fs_gamename.string:"Nothing");
Con_TPrintf ("^Ue080^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081 %s Initialized ^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue082\n", *fs_gamename.string?fs_gamename.string:"Nothing");
//there might be some console command or somesuch waiting for the renderer to begin (demos or map command or whatever all need model support).
realtime+=1;
@ -4509,6 +4512,7 @@ void Host_Init (quakeparms_t *parms)
host_parms = *parms;
Cvar_Init();
TranslateInit();
Memory_Init ();
/*memory is working, its safe to printf*/
@ -4548,7 +4552,6 @@ void Host_Init (quakeparms_t *parms)
PF_Common_RegisterCvars();
#endif
TranslateInit();
#ifndef CLIENTONLY
SV_Init(parms);
#endif
@ -4572,7 +4575,7 @@ void Host_Init (quakeparms_t *parms)
#endif
// Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
//Con_TPrintf (TL_HEAPSIZE, parms->memsize/ (1024*1024.0));
//Con_Printf ("%4.1f megs RAM available.\n", parms->memsize/ (1024*1024.0));
R_SetRenderer(NULL);//set the renderer stuff to unset...

View file

@ -582,7 +582,7 @@ void CL_SendDownloadStartRequest(char *filename, char *localname, unsigned int f
strcpy (cls.downloadremotename, filename);
strcpy (cls.downloadlocalname, localname);
if (!(flags & DLLF_TEMPORARY))
Con_TPrintf (TL_DOWNLOADINGFILE, cls.downloadlocalname);
Con_TPrintf ("Downloading %s...\n", cls.downloadlocalname);
// download to a temp name, and only rename
// to the real name when done, so if interrupted
@ -737,7 +737,7 @@ qboolean CL_CheckFile(char *filename)
{
if (strstr (filename, ".."))
{
Con_TPrintf (TL_NORELATIVEPATHS);
Con_TPrintf ("Refusing to download a path with ..\n");
return true;
}
@ -803,7 +803,7 @@ qboolean CL_CheckOrEnqueDownloadFile (char *filename, char *localname, unsigned
//ZOID - can't download when recording
if (cls.demorecording)
{
Con_TPrintf (TL_NODOWNLOADINDEMO, filename);
Con_TPrintf ("Unable to download %s in record mode.\n", filename);
return true;
}
//ZOID - can't download when playback
@ -1936,7 +1936,7 @@ void CL_ParseDownload (void)
/*quakeforge http download redirection*/
if (cls.downloadqw)
{
Con_TPrintf (TL_CLS_DOWNLOAD_ISSET);
Con_Printf ("cls.download shouldn't have been set\n");
VFS_CLOSE (cls.downloadqw);
cls.downloadqw = NULL;
}
@ -1964,10 +1964,10 @@ void CL_ParseDownload (void)
if (size < 0)
{
Con_TPrintf (TL_FILENOTFOUND);
Con_TPrintf ("File not found.\n");
if (cls.downloadqw)
{
Con_TPrintf (TL_CLS_DOWNLOAD_ISSET);
Con_Printf ("cls.download shouldn't have been set\n");
VFS_CLOSE (cls.downloadqw);
cls.downloadqw = NULL;
}
@ -1994,7 +1994,7 @@ void CL_ParseDownload (void)
if (!cls.downloadqw)
{
msg_readcount += size;
Con_TPrintf (TL_FAILEDTOOPEN, cls.downloadtempname);
Con_TPrintf ("Failed to open %s\n", cls.downloadtempname);
CL_DownloadFailed(cls.downloadremotename, true);
CL_RequestNextDownload ();
return;
@ -2257,7 +2257,7 @@ Con_DPrintf ("UPLOAD: %6d: %d written\n", upload_pos - r, r);
if (upload_pos != upload_size)
return;
Con_TPrintf (TL_UPLOADCOMPLEATE);
Con_TPrintf ("Upload completed\n");
CL_StopUpload();
}
@ -2443,7 +2443,7 @@ void CLQW_ParseServerData (void)
if (cls.fteprotocolextensions2||cls.fteprotocolextensions)
if (developer.ival || cl_shownet.ival)
Con_TPrintf (TL_FTEEXTENSIONS, cls.fteprotocolextensions2, cls.fteprotocolextensions);
Con_TPrintf ("Using FTE extensions 0x%x%08x\n", cls.fteprotocolextensions2, cls.fteprotocolextensions);
if (cls.fteprotocolextensions & PEXT_FLOATCOORDS)
{
@ -2609,8 +2609,8 @@ void CLQW_ParseServerData (void)
Con_Printf ("\n\n");
Con_Printf ("\1%s\n", str);
#else
Con_TPrintf (TLC_LINEBREAK_NEWLEVEL);
Con_TPrintf (TLC_PC_PS_NL, 2, str);
Con_TPrintf ("\n\n^Ue01d^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01f\n\n");
Con_Printf ("%c%s\n", 2, str);
#endif
if (CL_RemoveClientCommands("new")) //mvdsv is really appaling some times.
@ -2745,8 +2745,8 @@ void CLQ2_ParseServerData (void)
else
{
// seperate the printfs so the server message can have a color
Con_TPrintf (TLC_LINEBREAK_NEWLEVEL);
Con_TPrintf (TLC_PC_PS_NL, 2, str);
Con_TPrintf ("\n\n^Ue01d^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01f\n\n");
Con_Printf ("%c%s\n", 2, str);
Media_StopFilm(true);
@ -2890,7 +2890,7 @@ void CLNQ_ParseServerData(void) //Doesn't change gamedir - use with caution.
char *str;
int gametype;
if (developer.ival)
Con_TPrintf (TLC_GOTSVDATAPACKET);
Con_TPrintf ("Serverdata packet received.\n");
SCR_SetLoadingStage(LS_CLIENT);
CL_ClearState ();
Stats_NewMap();
@ -2917,8 +2917,8 @@ void CLNQ_ParseServerData(void) //Doesn't change gamedir - use with caution.
Con_Printf ("\n\n");
Con_Printf ("\1%s\n", str);
#else
Con_TPrintf (TLC_LINEBREAK_NEWLEVEL);
Con_TPrintf (TLC_PC_PS_NL, 2, str);
Con_TPrintf ("\n\n^Ue01d^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01f\n\n");
Con_Printf ("%c%s\n", 2, str);
#endif
SCR_BeginLoadingPlaque();
@ -2934,7 +2934,7 @@ void CLNQ_ParseServerData(void) //Doesn't change gamedir - use with caution.
break;
if (nummodels==MAX_MODELS)
{
Con_TPrintf (TLC_TOOMANYMODELPRECACHES);
Con_TPrintf ("Server sent too many model precaches\n");
return;
}
strcpy (cl.model_name[nummodels], str);
@ -2951,7 +2951,7 @@ void CLNQ_ParseServerData(void) //Doesn't change gamedir - use with caution.
break;
if (numsounds==MAX_SOUNDS)
{
Con_TPrintf (TLC_TOOMANYSOUNDPRECACHES);
Con_TPrintf ("Server sent too many sound precaches\n");
return;
}
strcpy (cl.sound_name[numsounds], str);
@ -3724,7 +3724,7 @@ void CL_ParseStatic (int version)
if (!cl.worldmodel || cl.worldmodel->needload)
{
Con_TPrintf (TLC_PARSESTATICWITHNOMAP);
Con_TPrintf ("Warning: Parsestatic and no map loaded yet\n");
return;
}
if (ent->model)
@ -5384,9 +5384,9 @@ void CLQW_ParseServerMessage (void)
//
if (cl_shownet.value == 1)
Con_TPrintf (TL_INT_SPACE,net_message.cursize);
Con_Printf ("%i ",net_message.cursize);
else if (cl_shownet.value >= 2)
Con_TPrintf (TLC_LINEBREAK_MINUS);
Con_Printf ("------------------\n");
CL_ParseClientdata ();
@ -5907,9 +5907,9 @@ void CLQ2_ParseServerMessage (void)
// if recording demos, copy the message out
//
if (cl_shownet.value == 1)
Con_TPrintf (TL_INT_SPACE,net_message.cursize);
Con_Printf ("%i ",net_message.cursize);
else if (cl_shownet.value == 2)
Con_TPrintf (TLC_LINEBREAK_MINUS);
Con_Printf ("------------------\n");
CL_ParseClientdata ();
@ -5976,7 +5976,7 @@ void CLQ2_ParseServerMessage (void)
Host_EndGame ("Server disconnected");
return;
case svcq2_reconnect: //8
Con_TPrintf (TLC_RECONNECTING);
Con_TPrintf ("reconnecting...\n");
CL_SendClientCommand(true, "new");
break;
case svcq2_sound: //9 // <see code>
@ -6207,9 +6207,9 @@ void CLNQ_ParseServerMessage (void)
// if recording demos, copy the message out
//
if (cl_shownet.value == 1)
Con_TPrintf (TL_INT_SPACE,net_message.cursize);
Con_Printf ("%i ",net_message.cursize);
else if (cl_shownet.value == 2)
Con_TPrintf (TLC_LINEBREAK_MINUS);
Con_Printf ("------------------\n");
CL_ParseClientdata ();

View file

@ -440,7 +440,7 @@ typedef struct
#ifdef NQPROT
int signon;
#endif
translation_t language;
int language;
colourised_t *colourised;
} client_static_t;

View file

@ -634,9 +634,9 @@ void CLQ3_ParseServerMessage (void)
return; //was a fragment.
if (cl_shownet.value == 1)
Con_TPrintf (TL_INT_SPACE,net_message.cursize);
Con_Printf ("%i ",net_message.cursize);
else if (cl_shownet.value == 2)
Con_TPrintf (TLC_LINEBREAK_MINUS);
Con_Printf ("------------------\n");
net_message.packing = SZ_RAWBYTES;
MSG_BeginReading(msg_nullnetprim);

View file

@ -65,6 +65,8 @@ cvar_t cl_chatmode = SCVAR("cl_chatmode", "2");
cvar_t con_numnotifylines_chat = CVAR("con_numnotifylines_chat", "8");
cvar_t con_notifytime_chat = CVAR("con_notifytime_chat", "8");
cvar_t con_separatechat = CVAR("con_separatechat", "0");
cvar_t con_timestamps = CVAR("con_timestamps", "0");
cvar_t con_timeformat = CVAR("con_timeformat", "(%H:%M:%S) ");
#define NUM_CON_TIMES 24
@ -570,7 +572,7 @@ void Con_Init (void)
Q_strncpyz(con_main.title, "MAIN", sizeof(con_main.title));
con_initialized = true;
Con_Printf ("Console initialized.\n");
Con_TPrintf ("Console initialized.\n");
//
// register our commands
@ -584,6 +586,8 @@ void Con_Init (void)
Cvar_Register (&con_numnotifylines_chat, "Console controls");
Cvar_Register (&con_notifytime_chat, "Console controls");
Cvar_Register (&con_separatechat, "Console controls");
Cvar_Register (&con_timestamps, "Console controls");
Cvar_Register (&con_timeformat, "Console controls");
Cmd_AddCommand ("toggleconsole", Con_ToggleConsole_f);
Cmd_AddCommand ("messagemode", Con_MessageMode_f);
@ -632,6 +636,35 @@ If no console is visible, the notify window will pop up.
================
*/
void Con_PrintConChars (console_t *con, conchar_t *c, int len)
{
conline_t *oc;
conchar_t *o;
if (con->selstartline == con->current)
con->selstartline = NULL;
if (con->selendline == con->current)
con->selendline = NULL;
oc = con->current;
if (oc->length+len > oc->maxlength)
{
oc->maxlength = (oc->length+len)+8;
if (oc->maxlength < oc->length)
oc->length = 0; //don't crash from console line overflows.
con->current = BZ_Realloc(con->current, sizeof(*con->current)+(oc->maxlength)*sizeof(conchar_t));
}
if (con->display == oc)
con->display = con->current;
if (con->oldest == oc)
con->oldest = con->current;
if (con->current->older)
con->current->older->newer = con->current;
o = (conchar_t *)(con->current+1)+con->current->length;
memcpy(o, c, sizeof(*o) * len);
con->current->length+=len;
}
void Con_PrintCon (console_t *con, char *txt)
{
conchar_t expanded[4096];
@ -648,7 +681,7 @@ void Con_PrintCon (console_t *con, char *txt)
{
conchar_t *o;
switch (*c & (CON_CHARMASK|CON_HIDDEN))
switch (*c & (CON_CHARMASK|CON_HIDDEN)) //include hidden so we don't do \r or \n on hidden chars, allowing them to be embedded in links and stuff.
{
case '\r':
con->cr = true;
@ -702,8 +735,6 @@ void Con_PrintCon (console_t *con, char *txt)
con->current->newer = reuse;
con->current = reuse;
con->current->length = 0;
o = (conchar_t *)(con->current+1)+con->current->length;
*o = 0;
if (con->display == con->current->older)
con->display = con->current;
break;
@ -714,15 +745,26 @@ void Con_PrintCon (console_t *con, char *txt)
con->cr = false;
}
if (!con->current->length && con_timestamps.ival)
{
char timeasc[64];
conchar_t timecon[64], *timeconend;
time_t rawtime;
time (&rawtime);
strftime(timeasc, sizeof(timeasc), con_timeformat.string, localtime (&rawtime));
timeconend = COM_ParseFunString(con->defaultcharbits, timeasc, timecon, sizeof(timecon), false);
Con_PrintConChars(con, timecon, timeconend-timecon);
}
if (con->selstartline == con->current)
con->selstartline = NULL;
if (con->selendline == con->current)
con->selendline = NULL;
oc = con->current;
if (oc->length+2 > oc->maxlength)
if (oc->length+1 > oc->maxlength)
{
oc->maxlength = (oc->length+2)+8;
oc->maxlength = (oc->length+1)+8;
if (oc->maxlength < oc->length)
oc->length = 0; //don't crash from console line overflows.
con->current = BZ_Realloc(con->current, sizeof(*con->current)+(oc->maxlength)*sizeof(conchar_t));
@ -736,7 +778,6 @@ void Con_PrintCon (console_t *con, char *txt)
con->current->older->newer = con->current;
o = (conchar_t *)(con->current+1)+con->current->length;
*o = *c;
o[1] = 0;
con->current->length+=1;
break;
}
@ -832,7 +873,7 @@ void VARGS Con_TPrintf (translation_t text, ...)
{
va_list argptr;
char msg[MAXPRINTMSG];
char *fmt = languagetext[text][cls.language];
const char *fmt = langtext(text, cls.language);
va_start (argptr,text);
vsnprintf (msg,sizeof(msg), fmt,argptr);
@ -846,7 +887,7 @@ void VARGS Con_SafeTPrintf (translation_t text, ...)
{
va_list argptr;
char msg[MAXPRINTMSG];
char *fmt = languagetext[text][cls.language];
const char *fmt = langtext(text, cls.language);
va_start (argptr,text);
vsnprintf (msg,sizeof(msg), fmt,argptr);

View file

@ -999,7 +999,7 @@ qboolean R_ApplyRenderer_Load (rendererstate_t *newr)
isDedicated = false;
#endif
if (newr)
Con_Printf("Setting mode %i*%i*%i*%i %s\n", newr->width, newr->height, newr->bpp, newr->rate, newr->renderer->description);
Con_TPrintf("Setting mode %i*%i*%i*%i %s\n", newr->width, newr->height, newr->bpp, newr->rate, newr->renderer->description);
if (host_basepal)
BZ_Free(host_basepal);
@ -1313,7 +1313,7 @@ TRACE(("dbg: R_ApplyRenderer: efrags\n"));
if (newr && qrenderer != QR_NONE)
{
Con_Printf("%s renderer initialized\n", newr->renderer->description);
Con_TPrintf("%s renderer initialized\n", newr->renderer->description);
}
TRACE(("dbg: R_ApplyRenderer: S_Restart_f\n"));

View file

@ -2702,6 +2702,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
*COM_SkipPath(bindir) = 0;
parms.argv = (const char **)argv;
host_parms.binarydir = bindir;
COM_InitArgv (parms.argc, parms.argv);
if (Sys_CheckUpdated())

View file

@ -208,7 +208,7 @@ void CL_Say_f (void)
SV_ConSay_f();
else
#endif
Con_TPrintf (TL_CANTXNOTCONNECTED, Cmd_Argv(0));
Con_TPrintf ("Can't \"%s\", not connected\n", Cmd_Argv(0));
return;
}
@ -216,7 +216,7 @@ void CL_Say_f (void)
{
if (strcmp(Info_ValueForKey(cl.serverinfo, "*distrib"), DISTRIBUTION) || atoi(Info_ValueForKey(cl.serverinfo, "*ver")) < PRE_SAYONE)
{
Con_TPrintf (TLC_REQUIRESSERVERMOD, Cmd_Argv(0));
Con_Printf ("%s is only available with server support\n", Cmd_Argv(0));
return;
}
}

View file

@ -214,7 +214,7 @@ void Cbuf_AddText (const char *text, int level)
if (newmax > cmd_maxbuffersize.ival && cmd_maxbuffersize.ival)
{
Con_TPrintf (TL_FUNCOVERFLOW, "Cbuf_AddText");
Con_TPrintf ("%s: overflow\n", "Cbuf_AddText");
return;
}
while (newmax < cmd_text[level].buf.cursize + l)
@ -509,7 +509,7 @@ void Cmd_Exec_f (void)
if (Cmd_Argc () != 2)
{
Con_TPrintf (TL_EXECCOMMANDUSAGE);
Con_TPrintf ("exec <filename> : execute a script file\n");
return;
}
@ -531,11 +531,11 @@ void Cmd_Exec_f (void)
;
else
{
Con_TPrintf (TL_EXECFAILED,name);
Con_TPrintf ("couldn't exec %s\n",name);
return;
}
if (cl_warncmd.ival || developer.ival)
Con_TPrintf (TL_EXECING,name);
Con_TPrintf ("execing %s\n",name);
s = f;
if (s[0] == '\xef' && s[1] == '\xbb' && s[2] == '\xbf')
@ -656,7 +656,7 @@ void Cmd_Alias_f (void)
{
if (Cmd_ExecLevel==RESTRICT_SERVER)
{
Con_TPrintf (TL_CURRENTALIASCOMMANDS);
Con_TPrintf ("Current alias commands:\n");
for (a = cmd_alias ; a ; a=a->next)
{
if (a->flags & ALIAS_FROMSERVER)
@ -666,7 +666,7 @@ void Cmd_Alias_f (void)
}
else
{
Con_TPrintf (TL_CURRENTALIASCOMMANDS);
Con_TPrintf ("Current alias commands:\n");
for (a = cmd_alias ; a ; a=a->next)
{
/* extern int con_linewidth;
@ -682,7 +682,7 @@ void Cmd_Alias_f (void)
s = Cmd_Argv(1);
if (strlen(s) >= MAX_ALIAS_NAME || !strcmp(s, "say")) //reject aliasing the say command. We use it as an easy way to warn that our player is cheating.
{
Con_TPrintf (TL_ALIASNAMETOOLONG);
Con_TPrintf ("Alias name is too long\n");
return;
}
@ -727,7 +727,7 @@ void Cmd_Alias_f (void)
{
if ((a->restriction?a->restriction:rcon_level.ival) > Cmd_ExecLevel)
{
Con_TPrintf (TL_ALIASRESTRICTIONLEVELERROR);
Con_TPrintf ("Alias is already bound with a higher restriction\n");
return;
}
@ -869,7 +869,7 @@ void Cmd_AliasLevel_f (void)
int level;
if (Cmd_Argc() < 2 || Cmd_Argc() > 3)
{
Con_TPrintf(TL_ALIASLEVELCOMMANDUSAGE);
Con_TPrintf("aliaslevel <var> [execlevel]\n");
return;
}
@ -882,7 +882,7 @@ void Cmd_AliasLevel_f (void)
}
if (!a)
{
Con_TPrintf(TL_ALIASNOTFOUND);
Con_TPrintf("Alias not found\n");
return;
}
@ -898,17 +898,17 @@ void Cmd_AliasLevel_f (void)
if (level > Cmd_ExecLevel || (a->restriction?a->restriction:rcon_level.ival) > Cmd_ExecLevel)
{
Con_TPrintf(TL_ALIASRAISELEVELERROR);
Con_TPrintf("You arn't allowed to raise a command above your own level\n");
return;
}
a->execlevel = level;
if (a->restriction == 1)
Con_TPrintf(TL_ALIASRESTRICTIONLEVELWARN, a->name);
Con_TPrintf("WARNING: %s is available to all clients, any client will be able to use it at the new level.\n", a->name);
}
else
Con_TPrintf(TL_ALIASRESTRICTLEVEL, s, a->execlevel);
Con_TPrintf("alias %s is set to run at the user level of %i\n", s, a->execlevel);
}
//lists commands, also prints restriction level
@ -930,7 +930,7 @@ void Cmd_AliasList_f (void)
if (flags && !(cmd->flags & flags))
continue;
if (!num)
Con_TPrintf(TL_ALIASLIST);
Con_TPrintf("Alias list:\n");
if (cmd->execlevel)
Con_Printf("(%2i)(%2i) %s\n", (int)(cmd->restriction?cmd->restriction:rcon_level.ival), cmd->execlevel, cmd->name);
else
@ -1569,7 +1569,7 @@ void Cmd_RestrictCommand_f (void)
level = RESTRICT_MAX;
if (level > Cmd_ExecLevel)
{
Con_TPrintf(TL_RESTRICTCOMMANDRAISE);
Con_TPrintf("You arn't allowed to raise a command above your own level\n");
return;
}
}
@ -1585,12 +1585,12 @@ void Cmd_RestrictCommand_f (void)
if (Cmd_Argc() == 2)
{
if (cmd->restriction)
Con_TPrintf (TL_RESTRICTCURRENTLEVEL, cmd_name, (int)cmd->restriction);
Con_TPrintf ("%s is restricted to %i\n", cmd_name, (int)cmd->restriction);
else
Con_TPrintf (TL_RESTRICTCURRENTLEVELDEFAULT, cmd_name, rcon_level.ival);
Con_TPrintf ("%s is restricted to rcon_level (%i)\n", cmd_name, rcon_level.ival);
}
else if ((cmd->restriction?cmd->restriction:rcon_level.ival) > Cmd_ExecLevel)
Con_TPrintf(TL_RESTRICTCOMMANDTOOHIGH);
Con_TPrintf("You arn't allowed to alter a level above your own\n");
else
cmd->restriction = level;
return;
@ -1604,12 +1604,12 @@ void Cmd_RestrictCommand_f (void)
if (Cmd_Argc() == 2)
{
if (v->restriction)
Con_TPrintf (TL_RESTRICTCURRENTLEVEL, cmd_name, (int)v->restriction);
Con_TPrintf ("%s is restricted to %i\n", cmd_name, (int)v->restriction);
else
Con_TPrintf (TL_RESTRICTCURRENTLEVELDEFAULT, cmd_name, rcon_level.ival);
Con_TPrintf ("%s is restricted to rcon_level (%i)\n", cmd_name, rcon_level.ival);
}
else if ((v->restriction?v->restriction:rcon_level.ival) > Cmd_ExecLevel)
Con_TPrintf(TL_RESTRICTCOMMANDTOOHIGH);
Con_TPrintf("You arn't allowed to alter a level above your own\n");
else
v->restriction = level;
@ -1624,19 +1624,19 @@ void Cmd_RestrictCommand_f (void)
if (Cmd_Argc() == 2)
{
if (a->restriction)
Con_TPrintf (TL_RESTRICTCURRENTLEVEL, cmd_name, (int)a->restriction);
Con_TPrintf ("%s is restricted to %i\n", cmd_name, (int)a->restriction);
else
Con_TPrintf (TL_RESTRICTCURRENTLEVELDEFAULT, cmd_name, rcon_level.ival);
Con_TPrintf ("%s is restricted to rcon_level (%i)\n", cmd_name, rcon_level.ival);
}
else if ((a->restriction?a->restriction:rcon_level.ival) > Cmd_ExecLevel)
Con_TPrintf(TL_RESTRICTCOMMANDTOOHIGH);
Con_TPrintf("You arn't allowed to alter a level above your own\n");
else
a->restriction = level;
return;
}
}
Con_TPrintf (TL_RESTRICTNOTDEFINED, cmd_name);
Con_TPrintf ("restrict: %s not defined\n", cmd_name);
return;
}
@ -1833,7 +1833,7 @@ void Cmd_List_f (void)
if ((cmd->restriction?cmd->restriction:rcon_level.ival) > Cmd_ExecLevel)
continue;
if (!num)
Con_TPrintf(TL_COMMANDLISTHEADER);
Con_TPrintf("Command list:\n");
Con_Printf("(%2i) %s\n", (int)(cmd->restriction?cmd->restriction:rcon_level.ival), cmd->name);
num++;
}
@ -1858,7 +1858,7 @@ void Cmd_ForwardToServer (void)
if (cls.state == ca_disconnected)
{
if (cl_warncmd.ival)
Con_TPrintf (TL_CANTXNOTCONNECTED, Cmd_Argv(0));
Con_TPrintf ("Can't \"%s\", not connected\n", Cmd_Argv(0));
return;
}
@ -1895,7 +1895,7 @@ void Cmd_ForwardToServer_f (void)
{
if (cls.state == ca_disconnected)
{
Con_TPrintf (TL_CANTXNOTCONNECTED, Cmd_Argv(0));
Con_TPrintf ("Can't \"%s\", not connected\n", Cmd_Argv(0));
return;
}
@ -1969,7 +1969,7 @@ void Cmd_ExecuteString (char *text, int level)
break; //yes, I know we found it... (but it's the wrong case, go for an alias or cvar instead FIRST)
if ((cmd->restriction?cmd->restriction:rcon_level.ival) > level)
Con_TPrintf(TL_WASRESTIRCTED, cmd_argv[0]);
Con_TPrintf("%s was restricted.\n", cmd_argv[0]);
else if (!cmd->function)
{
#ifdef VM_CG
@ -2010,7 +2010,7 @@ void Cmd_ExecuteString (char *text, int level)
if ((a->restriction?a->restriction:rcon_level.ival) > level)
{
Con_TPrintf(TL_WASRESTIRCTED, cmd_argv[0]);
Con_TPrintf("%s was restricted.\n", cmd_argv[0]);
return;
}
if (a->execlevel)
@ -2045,7 +2045,7 @@ void Cmd_ExecuteString (char *text, int level)
if (cmd) //go for skipped ones
{
if ((cmd->restriction?cmd->restriction:rcon_level.ival) > level)
Con_TPrintf(TL_WASRESTIRCTED, cmd_argv[0]);
Con_TPrintf("%s was restricted.\n", cmd_argv[0]);
else if (!cmd->function)
Cmd_ForwardToServer ();
else
@ -2094,7 +2094,7 @@ void Cmd_ExecuteString (char *text, int level)
}
#endif
if (cl_warncmd.value || developer.value)
Con_TPrintf (TL_COMMANDNOTDEFINED, Cmd_Argv(0));
Con_TPrintf ("Unknown command \"%s\"\n", Cmd_Argv(0));
}
@ -2532,7 +2532,7 @@ void Cmd_if_f(void)
if (Cmd_Argc()==1)
{
Con_TPrintf(TL_IFSYNTAX);
Con_TPrintf("if <condition> <statement> [elseif <condition> <statement>] [...] [else <statement>]\n");
return;
}
@ -2544,7 +2544,7 @@ elseif:
for(ret = If_Token(text, (const char **)&end); *ret; ret++) {if (*ret != '0' && *ret != '.')break;}
if (!end)
{
Con_TPrintf(TL_IFSYNTAXERROR);
Con_TPrintf("Not terminated\n");
If_Token_Clear(ts);
return;
}
@ -2668,7 +2668,7 @@ void Cmd_set_f(void)
if (Cmd_Argc()<3)
{
Con_TPrintf(TL_SETSYNTAX);
Con_TPrintf("set <var> <equation>\n");
return;
}

View file

@ -2062,7 +2062,7 @@ unsigned int utf8_decode(int *error, const void *in, char **out)
if (*error == 4)
{
*out = lowend;
uc = (((uc&0x3ff) << 10) || (lowsur&0x3ff)) + 0x10000;
uc = (((uc&0x3ffu) << 10) || (lowsur&0x3ffu)) + 0x10000;
*error = false;
}
else
@ -2075,7 +2075,7 @@ unsigned int utf8_decode(int *error, const void *in, char **out)
*error = 4; //bad - tail surrogate
//these are meant to be illegal too
if (uc == 0xfffeu || uc == 0xffffu || uc > 0x10ffff)
if (uc == 0xfffeu || uc == 0xffffu || uc > 0x10ffffu)
*error = 2; //illegal code
}
@ -3871,7 +3871,7 @@ void COM_CheckRegistered (void)
registered.defaultstr = newdef;
Cvar_ForceSet(&registered, newdef);
if (static_registered)
Con_TPrintf (TL_REGISTEREDVERSION);
Con_TPrintf ("Playing registered version.\n");
}
}
@ -3984,7 +3984,7 @@ void COM_Version_f (void)
{
Con_Printf("%s\n", version_string());
Con_TPrintf (TL_EXEDATETIME, __DATE__, __TIME__);
Con_TPrintf ("Exe: %s %s\n", __DATE__, __TIME__);
#ifdef SVNREVISION
if (strcmp(STRINGIFY(SVNREVISION), "-"))
@ -4278,7 +4278,7 @@ varargs versions of all text functions.
FIXME: make this buffer size safe someday
============
*/
char *VARGS va(char *format, ...)
char *VARGS va(const char *format, ...)
{
#define VA_BUFFERS 2 //power of two
va_list argptr;

View file

@ -321,7 +321,7 @@ void COM_DefaultExtension (char *path, char *extension, int maxlen);
char *COM_FileExtension (const char *in);
void COM_CleanUpPath(char *str);
char *VARGS va(char *format, ...) LIKEPRINTF(1);
char *VARGS va(const char *format, ...) LIKEPRINTF(1);
// does a varargs printf into a temp buffer
//============================================================================

View file

@ -345,7 +345,7 @@ void Cvar_List_f (void)
// print cvar list header
if (!(listflags & CLF_RAW) && !num)
Con_TPrintf(TL_CVARLISTHEADER);
Con_TPrintf("CVar list:\n");
// print group header
if (!(listflags & CLF_RAW) && !gnum)

View file

@ -484,7 +484,7 @@ void COM_Path_f (void)
{
searchpath_t *s;
Con_TPrintf (TL_CURRENTSEARCHPATH);
Con_TPrintf ("Current search path:\n");
if (com_purepaths || fs_puremode)
{
@ -1259,6 +1259,11 @@ vfsfile_t *FS_OpenVFS(const char *filename, const char *mode, enum fs_relative r
case FS_SKINS: //load from paks in preference to system paths. overwriting be damned.
FS_NativePath(filename, relativeto, fullname, sizeof(fullname));
break;
case FS_BINARYPATH:
if (*mode == 'w')
COM_CreatePath(fullname);
FS_NativePath(filename, relativeto, fullname, sizeof(fullname));
return VFSOS_Open(fullname, mode);
case FS_ROOT: //always bypass packs and gamedirs
if (*com_homedir)
{
@ -1966,6 +1971,15 @@ void COM_Gamedir (const char *dir)
if (!fs_manifest)
FS_ChangeGame(NULL, true);
//don't allow leading dots, hidden files are evil.
//don't allow complex paths. those are evil too.
if (!*dir || *dir == '.' || !strcmp(dir, ".") || strstr(dir, "..") || strstr(dir, "/")
|| strstr(dir, "\\") || strstr(dir, ":") )
{
Con_Printf ("Gamedir should be a single filename, not a path\n");
return;
}
man = FS_Manifest_Clone(fs_manifest);
FS_Manifest_PurgeGamedirs(man);
if (*dir)
@ -2342,10 +2356,20 @@ void FS_ReloadPackFilesFlags(unsigned int reloadflags)
for (i = 0; i < sizeof(fs_manifest->gamepath) / sizeof(fs_manifest->gamepath[0]); i++)
{
if (fs_manifest->gamepath[i].path && fs_manifest->gamepath[i].base)
char *dir = fs_manifest->gamepath[i].path;
if (dir && fs_manifest->gamepath[i].base)
{
//don't allow leading dots, hidden files are evil.
//don't allow complex paths. those are evil too.
if (!*dir || *dir == '.' || !strcmp(dir, ".") || strstr(dir, "..") || strstr(dir, "/")
|| strstr(dir, "\\") || strstr(dir, ":") )
{
Con_Printf ("Gamedir should be a single filename, not a path\n");
continue;
}
//paths with '*' actually result in loading packages without an actual gamedir. note that this does not imply that we can write anything.
if (*fs_manifest->gamepath[i].path == '*')
if (*dir == '*')
{
int j;
searchpathfuncs_t *handle = VFSOS_OpenPath(NULL, com_quakedir);
@ -2369,25 +2393,35 @@ void FS_ReloadPackFilesFlags(unsigned int reloadflags)
}
else
{
FS_AddGameDirectory(&oldpaths, fs_manifest->gamepath[i].path, va("%s%s", com_quakedir, fs_manifest->gamepath[i].path), reloadflags);
FS_AddGameDirectory(&oldpaths, dir, va("%s%s", com_quakedir, dir), reloadflags);
if (*com_homedir)
FS_AddGameDirectory(&oldpaths, fs_manifest->gamepath[i].path, va("%s%s", com_homedir, fs_manifest->gamepath[i].path), reloadflags);
FS_AddGameDirectory(&oldpaths, dir, va("%s%s", com_homedir, dir), reloadflags);
}
}
}
com_base_searchpaths = com_searchpaths;
for (i = 0; i < sizeof(fs_manifest->gamepath) / sizeof(fs_manifest->gamepath[0]); i++)
{
if (fs_manifest->gamepath[i].path && !fs_manifest->gamepath[i].base)
char *dir = fs_manifest->gamepath[i].path;
if (dir && !fs_manifest->gamepath[i].base)
{
if (*fs_manifest->gamepath[i].path == '*')
//don't allow leading dots, hidden files are evil.
//don't allow complex paths. those are evil too.
if (!*dir || *dir == '.' || !strcmp(dir, ".") || strstr(dir, "..") || strstr(dir, "/")
|| strstr(dir, "\\") || strstr(dir, ":") )
{
Con_Printf ("Gamedir should be a single filename, not a path\n");
continue;
}
if (*dir == '*')
{
}
else
{
FS_AddGameDirectory(&oldpaths, fs_manifest->gamepath[i].path, va("%s%s", com_quakedir, fs_manifest->gamepath[i].path), reloadflags);
FS_AddGameDirectory(&oldpaths, dir, va("%s%s", com_quakedir, dir), reloadflags);
if (*com_homedir)
FS_AddGameDirectory(&oldpaths, fs_manifest->gamepath[i].path, va("%s%s", com_homedir, fs_manifest->gamepath[i].path), reloadflags);
FS_AddGameDirectory(&oldpaths, dir, va("%s%s", com_homedir, dir), reloadflags);
}
}
}
@ -3652,7 +3686,7 @@ void COM_InitFilesystem (void)
*com_homedir = '\0';
if (*com_homedir)
Con_Printf("Using home directory \"%s\"\n", com_homedir);
Con_TPrintf("Using home directory \"%s\"\n", com_homedir);
#ifdef PLUGINS
Plug_Initialise(false);

View file

@ -372,7 +372,7 @@ searchpathfuncs_t *QDECL FSPAK_LoadArchive (vfsfile_t *file, const char *desc)
pack->references++;
Con_TPrintf (TL_ADDEDPACKFILE, desc, numpackfiles);
Con_TPrintf ("Added packfile %s (%i files)\n", desc, numpackfiles);
pack->pub.fsver = FSVER;
pack->pub.GetPathDetails = FSPAK_GetPathDetails;
@ -555,7 +555,7 @@ newsection:
pack->references++;
Con_TPrintf (TL_ADDEDPACKFILE, desc, numpackfiles);
Con_TPrintf ("Added packfile %s (%i files)\n", desc, numpackfiles);
pack->pub.fsver = FSVER;
pack->pub.GetPathDetails = FSPAK_GetPathDetails;

View file

@ -41,7 +41,7 @@ wchar_t *widen(wchar_t *out, size_t outlen, const char *utf8)
while (*utf8)
{
codepoint = utf8_decode(&error, utf8, (void*)&utf8);
if (error)
if (error || codepoint > 0x10FFFFu)
codepoint = 0xFFFDu;
if (codepoint > 0xffff)
{

View file

@ -677,7 +677,7 @@ searchpathfuncs_t *QDECL FSZIP_LoadArchive (vfsfile_t *packhandle, const char *d
if (!zip->handle)
{
Z_Free(zip);
Con_TPrintf (TL_COULDNTOPENZIP, desc);
Con_TPrintf ("Failed opening zipfile \"%s\" corrupt?\n", desc);
return NULL;
}
@ -707,7 +707,7 @@ searchpathfuncs_t *QDECL FSZIP_LoadArchive (vfsfile_t *packhandle, const char *d
zip->references = 1;
zip->currentfile = NULL;
Con_TPrintf (TL_ADDEDZIPFILE, desc, zip->numfiles);
Con_TPrintf ("Added zipfile %s (%i files)\n", desc, zip->numfiles);
zip->pub.fsver = FSVER;
zip->pub.GetPathDetails = FSZIP_GetPathDetails;

View file

@ -278,7 +278,7 @@ void SV_Fraglogfile_f (void)
if (sv_fraglogfile)
{
Con_TPrintf (STL_FLOGGINGOFF);
Con_TPrintf ("Frag file logging off.\n");
VFS_CLOSE (sv_fraglogfile);
sv_fraglogfile = NULL;
return;
@ -300,12 +300,12 @@ void SV_Fraglogfile_f (void)
}
if (i==1000)
{
Con_TPrintf (STL_FLOGGINGFAILED);
Con_TPrintf ("Can't open any logfiles.\n");
sv_fraglogfile = NULL;
return;
}
Con_TPrintf (STL_FLOGGINGTO, name);
Con_TPrintf ("Logging frags to %s.\n", name);
}
*/

View file

@ -302,7 +302,7 @@ void VARGS Netchan_OutOfBandTPrintf (netsrc_t sock, netadr_t *adr, int language,
va_list argptr;
static char string[8192]; // ??? why static?
char *format = langtext(text, language);
const char *format = langtext(text, language);
string[0] = A2C_PRINT;
@ -636,7 +636,7 @@ int Netchan_Transmit (netchan_t *chan, int length, qbyte *data, int rate)
if (chan->message.overflowed)
{
chan->fatal_error = true;
Con_TPrintf (TL_OUTMESSAGEOVERFLOW
Con_TPrintf ("%s:Outgoing message overflow\n"
, NET_AdrToString (remote_adr, sizeof(remote_adr), &chan->remote_address));
return 0;
}
@ -866,7 +866,7 @@ qboolean Netchan_Process (netchan_t *chan)
if (sequence <= (unsigned)chan->incoming_sequence)
{
if (showdrop.value)
Con_TPrintf (TL_OUTOFORDERPACKET
Con_TPrintf ("%s:Out of order packet %i at %i\n"
, NET_AdrToString (adr, sizeof(adr), &chan->remote_address)
, sequence
, chan->incoming_sequence);
@ -944,7 +944,7 @@ qboolean Netchan_Process (netchan_t *chan)
chan->drop_count += 1;
if (showdrop.value)
Con_TPrintf (TL_DROPPEDPACKETCOUNT
Con_TPrintf ("%s:Dropped %i packets at %i\n"
, NET_AdrToString (adr, sizeof(adr), &chan->remote_address)
, sequence-(chan->incoming_sequence+1)
, sequence);

View file

@ -2283,13 +2283,13 @@ qboolean FTENET_Generic_GetPacket(ftenet_generic_connection_t *con)
if (err == EMSGSIZE)
{
SockadrToNetadr (&from, &net_from);
Con_TPrintf (TL_OVERSIZEPACKETFROM,
Con_TPrintf ("Warning: Oversize packet from %s\n",
NET_AdrToString (adr, sizeof(adr), &net_from));
return false;
}
if (err == ECONNABORTED || err == ECONNRESET)
{
Con_TPrintf (TL_CONNECTIONLOSTORABORTED); //server died/connection lost.
Con_TPrintf ("Connection lost or aborted\n"); //server died/connection lost.
#ifndef SERVERONLY
if (cls.state != ca_disconnected && !con->islisten)
{
@ -2314,7 +2314,7 @@ qboolean FTENET_Generic_GetPacket(ftenet_generic_connection_t *con)
net_message.cursize = ret;
if (net_message.cursize == sizeof(net_message_buffer) )
{
Con_TPrintf (TL_OVERSIZEPACKETFROM, NET_AdrToString (adr, sizeof(adr), &net_from));
Con_TPrintf ("Warning: Oversize packet from %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
return false;
}
@ -2399,7 +2399,7 @@ qboolean FTENET_Generic_SendPacket(ftenet_generic_connection_t *con, int length,
Con_DPrintf("NET_SendPacket Warning: %i\n", ecode);
else
#endif
Con_TPrintf (TL_NETSENDERROR, ecode);
Con_TPrintf ("NET_SendPacket ERROR: %i\n", ecode);
}
return true;
#endif
@ -2714,7 +2714,7 @@ qboolean FTENET_TCPConnect_GetPacket(ftenet_generic_connection_t *gcon)
{
if (err == ECONNABORTED || err == ECONNRESET)
{
Con_TPrintf (TL_CONNECTIONLOSTORABORTED); //server died/connection lost.
Con_TPrintf ("Connection lost or aborted\n"); //server died/connection lost.
}
else
Con_Printf ("TCPConnect_GetPacket: Error (%i): %s\n", err, strerror(err));
@ -3021,7 +3021,7 @@ handshakeerror:
net_message.cursize = BigShort(*(short*)st->inbuffer);
if (net_message.cursize >= sizeof(net_message_buffer) )
{
Con_TPrintf (TL_OVERSIZEPACKETFROM, NET_AdrToString (adr, sizeof(adr), &st->remoteaddr));
Con_TPrintf ("Warning: Oversize packet from %s\n", NET_AdrToString (adr, sizeof(adr), &st->remoteaddr));
goto closesvstream;
}
if (net_message.cursize+2 > st->inlen)
@ -3175,7 +3175,7 @@ handshakeerror:
net_message.cursize = paylen;
if (net_message.cursize >= sizeof(net_message_buffer) )
{
Con_TPrintf (TL_OVERSIZEPACKETFROM, NET_AdrToString (adr, sizeof(adr), &net_from));
Con_TPrintf ("Warning: Oversize packet from %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
goto closesvstream;
}
memcpy(net_message_buffer, st->inbuffer+payoffs, paylen);
@ -3759,7 +3759,7 @@ qboolean FTENET_IRCConnect_GetPacket(ftenet_generic_connection_t *gcon)
net_message.cursize = 4 + endl - s;
if (net_message.cursize >= sizeof(net_message_buffer) )
{
Con_TPrintf (TL_OVERSIZEPACKETFROM, NET_AdrToString (adr, sizeof(adr), &net_from));
Con_TPrintf ("Warning: Oversize packet from %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
break;
}
@ -3886,7 +3886,7 @@ qboolean FTENET_IRCConnect_GetPacket(ftenet_generic_connection_t *gcon)
net_message.cursize = st->inlen;
if (net_message.cursize >= sizeof(net_message_buffer) )
{
Con_TPrintf (TL_OVERSIZEPACKETFROM, NET_AdrToString (adr, sizeof(adr), &net_from));
Con_TPrintf ("Warning: Oversize packet from %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
break;
}
@ -3918,7 +3918,7 @@ qboolean FTENET_IRCConnect_GetPacket(ftenet_generic_connection_t *gcon)
code = strtoul(s, (char **)&s, 10);
switch (code)
{
case 001:
case 1:
{
if (con->ircserver.address.irc.channel)
{
@ -4363,7 +4363,7 @@ static qboolean FTENET_NaClWebSocket_GetPacket(ftenet_generic_connection_t *gcon
if (len)
{
char adr[64];
Con_TPrintf (TL_OVERSIZEPACKETFROM, NET_AdrToString (adr, sizeof(adr), &net_from));
Con_TPrintf ("Warning: Oversize packet from %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
return false;
}
return true;
@ -4703,7 +4703,7 @@ int maxport = port + 100;
if ((i = COM_CheckParm("-ip")) != 0 && i < com_argc)
{
((struct sockaddr_in*)&address)->sin_addr.s_addr = inet_addr(com_argv[i+1]);
Con_TPrintf(TL_NETBINDINTERFACE,
Con_TPrintf("Binding to IP Interface Address of %s\n",
inet_ntoa(address.sin_addr));
}
else
@ -4784,7 +4784,7 @@ int maxport = port + 100;
//ZOID -- check for interface binding option
if ((i = COM_CheckParm("-ip")) != 0 && i < com_argc) {
address.sin_addr.s_addr = inet_addr(com_argv[i+1]);
Con_TPrintf(TL_NETBINDINTERFACE,
Con_TPrintf("Binding to IP Interface Address of %s\n",
inet_ntoa(address.sin_addr));
} else
address.sin_addr.s_addr = INADDR_ANY;
@ -4852,7 +4852,7 @@ int maxport = port + 100;
//ZOID -- check for interface binding option
// if ((i = COM_CheckParm("-ip6")) != 0 && i < com_argc) {
// address.sin6_addr = inet_addr(com_argv[i+1]);
/// Con_TPrintf(TL_NETBINDINTERFACE,
/// Con_TPrintf("Binding to IP Interface Address of %s\n",
// inet_ntoa(address.sin6_addr));
// } else
memset(&address.sin6_addr, 0, sizeof(struct in6_addr));
@ -5069,7 +5069,7 @@ void NET_GetLocalAddress (int socket, netadr_t *out)
if (!notvalid)
{
Con_TPrintf(TL_IPADDRESSIS, NET_AdrToString (adrbuf, sizeof(adrbuf), out) );
Con_TPrintf("IP address %s\n", NET_AdrToString (adrbuf, sizeof(adrbuf), out) );
return;
}
Con_Printf("Couldn't detect local ip\n");
@ -5218,7 +5218,7 @@ void NET_InitClient(void)
net_message.maxsize = sizeof(net_message_buffer);
net_message.data = net_message_buffer;
Con_TPrintf(TL_CLIENTPORTINITED);
Con_TPrintf("Client port Initialized\n");
}
#endif

View file

@ -252,7 +252,7 @@ plugin_t *Plug_Load(char *file, int type)
currentplug = newplug;
if (newplug->vm)
{
Con_Printf("Created plugin %s\n", file);
Con_TPrintf("Created plugin %s\n", file);
newplug->next = plugs;
plugs = newplug;

View file

@ -35,7 +35,6 @@ void PF_Common_RegisterCvars(void)
WPhys_Init();
}
char *Translate(char *message);
char *PF_VarString (pubprogfuncs_t *prinst, int first, struct globalvars_s *pr_globals)
{
#define VARSTRINGLEN 16384+8
@ -55,7 +54,6 @@ char *PF_VarString (pubprogfuncs_t *prinst, int first, struct globalvars_s *pr_g
s = PR_GetStringOfs(prinst, OFS_PARM0+i*3);
if (s)
{
s = Translate(s);
if (strlen(out)+strlen(s)+1 >= VARSTRINGLEN)
Con_DPrintf("VarString (builtin call ending with strings) exceeded maximum string length of %i chars", VARSTRINGLEN);

View file

@ -1,178 +0,0 @@
"STL_LANGUAGENAME \"English\"\n"
"STL_CLIENTCONNECTED \"client %s connected\\n\"\n"
"STL_SPECTATORCONNECTED \"spectator %s connected\\n\"\n"
"STL_RECORDEDCLIENTCONNECTED \"recorded client %s connected\\n\"\n"
"STL_RECORDEDSPECTATORCONNECTED \"recorded spectator %s connected\\n\"\n"
"STL_CLIENTWASBANNED \"%s was banned\\n\"\n"
"STL_YOUWEREBANNED \"You were banned\\n\"\n"
"STL_YOUAREBANNED \"You are still banned\\n\"\n"
"STL_CLIENTTIMEDOUT \"Client %s timed out\\n\"\n"
"STL_LOADZOMIBETIMEDOUT \"LoadZombie %s timed out\\n\"\n"
"STL_CLIENTWASKICKED \"%s was kicked\\n\"\n"
"STL_YOUWEREKICKED \"You were kicked\\n\"\n"
"STL_YOUWEREKICKEDNAMESPAM \"You were kicked for name spamming\\n\"\n"
"STL_CLIENTKICKEDNAMESPAM \"%s was kicked for name spamming\\n\"\n"
"STL_GODON \"godmode ON\\n\"\n"
"STL_GODOFF \"godmode OFF\\n\"\n"
"STL_NOCLIPON \"noclip ON\\n\"\n"
"STL_NOCLIPOFF \"noclip OFF\"\n"
"STL_CLIENTISCUFFEDPERMANENTLY \"%s is still cuffed\\n\"\n"
"STL_CLIENTISCUFFED \"%s is cuffed\\n\"\n"
"STL_CLIENTISSTILLCUFFED \"%s is now cuffed permanently\\n\"\n"
"STL_YOUWERECUFFED \"You were cuffed\\n\"\n"
"STL_YOUARNTCUFFED \"You are no longer cuffed\\n\"\n"
"STL_CLIENTISCRIPPLEDPERMANENTLY \"%s is now crippled permanently\\n\"\n"
"STL_CLIENTISCRIPPLED \"%s is crippled\\n\"\n"
"STL_CLIENTISSTILLCRIPPLED \"%s is still crippled\\n\"\n"
"STL_YOUWERECLIPPLED \"You have been crippled\\n\"\n"
"STL_YOUARNTCRIPPLED \"You are no longer crippled\\n\"\n"
"STL_CLIENTISMUTEDPERMANENTLY \"%s was muted permanently\\n\"\n"
"STL_CLIENTISMUTED \"%s was muted\\n\"\n"
"STL_CLIENTISSTILLMUTED \"%s is muted (still)\\n\"\n"
"STL_YOUAREMUTED \"%s is muted\\n\"\n"
"STL_YOUARNTMUTED \"You are no longer muted\\n\"\n"
"STL_NONAMEASMUTE \"Muted players may not change their names\\n\"\n"
"STL_MUTEDVOTE \"Sorry, you cannot vote when muted as it may allow you to send a message.\\n\"\n"
"STL_MUTEDCHAT \"You cannot chat while muted\\n\"\n"
"STL_FLOODPROTACTIVE \"floodprot: You can't talk for %i seconds\\n\"\n"
"STL_FLOODPROTTIME \"You can't talk for %i more seconds\\n\"\n"
"STL_BUFFERPROTECTION \"buffer overflow protection: failiure\\n\"\n"
"STL_FIRSTGREETING \"Welcome %s. Your time on this server is being logged and ranked\\n\"\n"
"STL_SHORTGREETING \"Welcome back %s. You have previously spent %i mins connected\\n\"\n"
"STL_BIGGREETING \"Welcome back %s. You have previously spent %i:%i hours connected\\n\"\n"
"STL_POSSIBLEMODELCHEAT \"warning: %s eyes or player model does not match\\n\"\n"
"STL_MAPCHEAT \"Map model file does not match (%s), %i != %i/%i.\\nYou may need a new version of the map, or the proper install files.\\n\"\n"
"STL_INVALIDTRACKCLIENT \"invalid player to track\\n\"\n"
"STL_BADNAME \"Can't change name - new is invalid\\n\"\n"
"STL_CLIENTNAMECHANGE \"%s changed their name to %s\\n\"\n"
"STL_SERVERPAUSED \"server is paused\\n\"\n"
"STL_UPLOADDENIED \"Upload denied\\n\"\n"
"STL_NAMEDCLIENTDOESNTEXIST \"client does not exist\\n\"\n"
"STL_NOSUICIDEWHENDEAD \"Can't suicide -- Already dead\\n\"\n"
"STL_CANTPAUSE \"Can't pause. Not allowed\\n\"\n"
"STL_CANTPAUSESPEC \"Spectators may not pause the game\\n\"\n"
"STL_CLIENTPAUSED \"%s paused the game\\n\"\n"
"STL_CLIENTUNPAUSED \"%s unpaused the game\\n\"\n"
"STL_CLIENTLESSUNPAUSE \"pause released due to empty server\\n\"\n"
"STL_CURRENTRATE \"current rate is %i\\n\"\n"
"STL_RATESETTO \"rate is changed to %i\\n\"\n"
"STL_CURRENTMSGLEVEL \"current msg level is %i\\n\"\n"
"STL_MSGLEVELSET \"new msg level set to %i\\n\"\n"
"STL_GAMESAVED \"Server has saved the game\\n\"\n"
"STL_CLIENTDROPPED \"%s dropped\\n\"\n"
"STL_SNAPREFUSED \"%s refused remote screenshot\\n\"\n"
"STL_FINALVOTE \"%s casts final vote for '%s'\\n\"\n"
"STL_VOTE \"%s casts a vote for '%s'\\n\"\n"
"STL_SPEEDCHEATKICKED \"%s was kicked for speedcheating (%s)\\n\"\n"
"STL_SPEEDCHEATPOSSIBLE \"Speed cheat possibility, analyzing:\\n %d %.1f %d for: %s\\n\"\n"
"STL_INITED \"======== %s Initialized ========\\n\"\n"
"STL_BACKBUFSET \"WARNING %s: [SV_New] Back buffered (%d0, clearing)\\n\"\n"
"STL_MESSAGEOVERFLOW \"WARNING: backbuf [%d] reliable overflow for %s\\n\"\n"
"STL_BUILDINGPHS \"Building PHS...\\n\"\n"
"STL_PHSINFO \"Average leafs visible / hearable / total: %i / %i / %i\\n\"\n"
"STL_BREAKSTATEMENT \"Break Statement\\n\"\n"
"STL_BADSPRINT \"tried to sprint to a non-client\\n\"\n"
"STL_NOPRECACHE \"no precache: %s\\n\"\n"
"STL_CANTFREEWORLD \"cannot free world entity\\n\"\n"
"STL_CANTFREEPLAYERS \"cannot free player entities\\n\"\n"
"STL_COMPILEROVER \"Compile took %f secs\\n\"\n"
"STL_EDICTWASFREE \"%s edict was free\\n\"\n"
"STL_NOFREEEDICTS \"WARNING: no free edicts\\n\"\n"
"STL_NEEDCHEATPARM \"You must run the server with -cheats to enable this command.\\n\"\n"
"STL_USERDOESNTEXIST \"Couldn't find user number %s\\n\"\n"
"STL_MAPCOMMANDUSAGE \"map <levelname> : continue game on a new level\\n\"\n"
"STL_NOVOTING \"Voting was dissallowed\\n\"\n"
"STL_BADVOTE \"You arn't allowed to vote for that\\n\"\n"
"STL_VOTESREMOVED \"All votes removed.\\n\"\n"
"STL_OLDVOTEREMOVED \"Old vote removed.\\n\"\n"
"TL_EXECING \"execing %s\\n\"\n"
"TL_EXECCOMMANDUSAGE \"exec <filename> : execute a script file\\n\"\n"
"TL_EXECFAILED \"couldn't exec %s\\n\"\n"
"TL_FUNCOVERFLOW \"%s: overflow\\n\"\n"
"TL_CURRENTALIASCOMMANDS \"Current alias commands:\\n\"\n"
"TL_ALIASNAMETOOLONG \"Alias name is too long\\n\"\n"
"TL_ALIASRESTRICTIONLEVELERROR \"Alias is already bound with a higher restriction\\n\"\n"
"TL_ALIASLEVELCOMMANDUSAGE \"aliaslevel <var> [execlevel]\\n\"\n"
"TL_ALIASNOTFOUND \"Alias not found\\n\"\n"
"TL_ALIASRAISELEVELERROR \"You arn't allowed to raise a command above your own level\\n\"\n"
"TL_ALIASRESTRICTIONLEVELWARN \"WARNING: %s is available to all clients, any client will be able to use it at the new level.\\n\"\n"
"TL_ALIASRESTRICTLEVEL \"alias %s is set to run at the user level of %i\\n\"\n"
"TL_ALIASLIST \"Alias list:\\n\"\n"
"TL_COMMANDLISTHEADER \"Command list:\\n\"\n"
"TL_CVARLISTHEADER \"CVar list:\\n\"\n"
"TL_RESTRICTCOMMANDRAISE \"You arn't allowed to raise a command above your own level\\n\"\n"
"TL_RESTRICTCOMMANDTOOHIGH \"You arn't allowed to alter a level above your own\\n\"\n"
"TL_RESTRICTCURRENTLEVEL \"%s is restricted to %i\\n\"\n"
"TL_RESTRICTCURRENTLEVELDEFAULT \"%s is restricted to rcon_level (%i)\\n\"\n"
"TL_RESTRICTNOTDEFINED \"restrict: %s not defined\\n\"\n"
"TL_WASRESTIRCTED \"%s was restricted.\\n\"\n"
"TL_COMMANDNOTDEFINED \"Unknown command \\\"%s\\\"\\n\"\n"
"TL_IFSYNTAX \"if <condition> <statement> [elseif <condition> <statement>] [...] [else <statement>]\\n\"\n"
"TL_IFSYNTAXERROR \"Not terminated\\n\"\n"
"TL_SETSYNTAX \"set <var> <equation>\\n\"\n"
"TL_CANTXNOTCONNECTED \"Can't \\\"%s\\\", not connected\\n\"\n"
"TL_SHAREWAREVERSION \"Playing shareware version.\\n\"\n"
"TL_REGISTEREDVERSION \"Playing registered version.\\n\"\n"
"TL_CURRENTSEARCHPATH \"Current search path:\\n\"\n"
"TL_SERACHPATHISPACK \"%s (%i files)\\n\"\n"
"TL_SERACHPATHISZIP \"%s (%i files)\\n\"\n"
"TL_COMPRESSEDFILEOPENFAILED \"Tried opening a handle to a compressed stream - %s\\n\"\n"
"TL_ADDEDPACKFILE \"Added packfile %s (%i files)\\n\"\n"
"TL_COULDNTOPENZIP \"Failed opening zipfile \\\"%s\\\" corrupt?\\n\"\n"
"TL_ADDEDZIPFILE \"Added zipfile %s (%i files)\\n\"\n"
"TL_GAMEDIRAINTPATH \"Gamedir should be a single filename, not a path\\n\"\n"
"TL_KEYHASSLASH \"Can't use a key with a \\\\\\n\"\n"
"TL_KEYHASQUOTE \"Can't use a key with a \\\"\\n\"\n"
"TL_KEYTOOLONG \"Keys and values must be < 64 characters.\\n\"\n"
"TL_INFOSTRINGTOOLONG \"Info string length exceeded\\n\"\n"
"TL_STARKEYPROTECTED \"Can't set * keys\\n\"\n"
"TL_KEYHASNOVALUE \"MISSING VALUE\\n\"\n"
"TL_OVERSIZEPACKETFROM \"Warning: Oversize packet from %s\\n\"\n"
"TL_CONNECTIONLOSTORABORTED \"Connection lost or aborted\\n\"\n"
"TL_NETGETPACKETERROR \"NET_GetPacket: %s\\n\"\n"
"TL_NETSENDERROR \"NET_SendPacket ERROR: %i\\n\"\n"
"TL_NETBINDINTERFACE \"Binding to IP Interface Address of %s\\n\"\n"
"TL_IPADDRESSIS \"IP address %s\\n\"\n"
"TL_UDPINITED \"UDP Initialized\\n\"\n"
"TL_CLIENTPORTINITED \"Client port Initialized\\n\"\n"
"TL_OUTMESSAGEOVERFLOW \"%s:Outgoing message overflow\\n\"\n"
"TL_OUTOFORDERPACKET \"%s:Out of order packet %i at %i\\n\"\n"
"TL_DROPPEDPACKETCOUNT \"%s:Dropped %i packets at %i\\n\"\n"
"STL_SERVERUNSPAWNED \"Server ended\\n\"\n"
"STL_SERVERSPAWNED \"Server spawned.\\n\"\n"
"TL_EXEDATETIME \"Exe: %s %s\\n\"\n"
"TL_HEAPSIZE \"%4.1f megabyte heap\\n\"\n"
"TL_VERSION \"\\nBuild %i\\n\\n\"\n"
"STL_SAVESYNTAX \"save <savename> : save a game\\n\"\n"
"STL_NORELATIVEPATHS \"Relative pathnames are not allowed.\\n\"\n"
"STL_SAVEGAMETO \"Saving game to %s...\\n\"\n"
"STL_ERRORCOULDNTOPEN \"ERROR: couldn't open.\\n\"\n"
"STL_SAVEDONE \"done.\\n\"\n"
"STL_LOADSYNTAX \"load <savename> : load a game\\n\"\n"
"STL_LOADGAMEFROM \"Loading game from %s...\\n\"\n"
"STL_BADSAVEVERSION \"Savegame is version %i, not %i\\n\"\n"
"STL_LOADFAILED \"Couldn't load map\\n\"\n"
"STL_NOMATERMODE \"Setting nomaster mode.\\n\"\n"
"STL_MASTERAT \"Master server at %s\\n\"\n"
"STL_SENDINGPING \"Sending a ping.\\n\"\n"
"STL_SHUTTINGDOWN \"Shutting down.\\n\"\n"
"STL_LOGGINGOFF \"File logging off.\\n\"\n"
"STL_LOGGINGTO \"Logging text to %s.\\n\"\n"
"STL_FLOGGINGOFF \"Frag file logging off.\\n\"\n"
"STL_FLOGGINGFAILED \"Can't open any logfiles.\\n\"\n"
"STL_FLOGGINGTO \"Logging frags to %s.\\n\"\n"
"STL_USERIDNOTONSERVER \"Userid %i is not on the server\\n\"\n"
"STL_CANTFINDMAP \"Can't find %s\\n\"\n"
"STL_SERVERINFOSETTINGS \"Server info settings:\\n\"\n"
"STL_SERVERINFOSYNTAX \"usage: serverinfo [ <key> <value> ]\\n\"\n"
"STL_LOCALINFOSETTINGS \"Local info settings:\\n\"\n"
"STL_LOCALINFOSYNTAX \"usage: localinfo [ <key> <value> ]\\n\"\n"
"STL_USERINFOSYNTAX \"Usage: info <userid>\\n\"\n"
"STL_NONEGATIVEVALUES \"All values must be positive numbers\\n\"\n"
"STL_CURRENTGAMEDIR \"Current gamedir: %s\\n\"\n"
"STL_SVGAMEDIRUSAGE \"Usage: sv_gamedir <newgamedir>\\n\"\n"
"STL_GAMEDIRCANTBEPATH \"*Gamedir should be a single filename, not a path\\n\"\n"
"STL_GAMEDIRUSAGE \"Usage: gamedir <newgamedir>\\n\"\n"
"STL_SNAPTOOMANYFILES \"Snap: Couldn't create a file, clean some out.\\n\"\n"
"STL_SNAPREQUEST \"Requesting snap from user %d...\\n\"\n"
"STL_SNAPUSAGE \"Usage: snap <userid>\\n\"\n"

View file

@ -1,257 +1,5 @@
#include "quakedef.h"
static char *defaultlanguagetext =
"STL_LANGUAGENAME \"English\"\n"
"TL_STNL \"%s\\n\"\n"
"STL_CLIENTCONNECTED \"client %s connected\\n\"\n"
"STL_SPECTATORCONNECTED \"spectator %s connected\\n\"\n"
"STL_RECORDEDCLIENTCONNECTED \"recorded client %s connected\\n\"\n"
"STL_RECORDEDSPECTATORCONNECTED \"recorded spectator %s connected\\n\"\n"
"STL_CLIENTWASBANNED \"%s was banned\\n\"\n"
"STL_YOUWEREBANNED \"You were banned\\n\"\n"
"STL_YOUAREBANNED \"You are still banned\\n\"\n"
"STL_CLIENTTIMEDOUT \"Client %s timed out\\n\"\n"
"STL_LOADZOMIBETIMEDOUT \"LoadZombie %s timed out\\n\"\n"
"STL_CLIENTWASKICKED \"%s was kicked\\n\"\n"
"STL_YOUWEREKICKED \"You were kicked\\n\"\n"
"STL_YOUWEREKICKEDNAMESPAM \"You were kicked for name spamming\\n\"\n"
"STL_CLIENTKICKEDNAMESPAM \"%s was kicked for name spamming\\n\"\n"
"STL_GODON \"godmode ON\\n\"\n"
"STL_GODOFF \"godmode OFF\\n\"\n"
"STL_NOCLIPON \"noclip ON\\n\"\n"
"STL_NOCLIPOFF \"noclip OFF\"\n"
"STL_CLIENTISCUFFEDPERMANENTLY \"%s is still cuffed\\n\"\n"
"STL_CLIENTISCUFFED \"%s is cuffed\\n\"\n"
"STL_CLIENTISSTILLCUFFED \"%s is now cuffed permanently\\n\"\n"
"STL_YOUWERECUFFED \"You were cuffed\\n\"\n"
"STL_YOUARNTCUFFED \"You are no longer cuffed\\n\"\n"
"STL_CLIENTISCRIPPLEDPERMANENTLY \"%s is now crippled permanently\\n\"\n"
"STL_CLIENTISCRIPPLED \"%s is crippled\\n\"\n"
"STL_CLIENTISSTILLCRIPPLED \"%s is still crippled\\n\"\n"
"STL_YOUWERECLIPPLED \"You have been crippled\\n\"\n"
"STL_YOUARNTCRIPPLED \"You are no longer crippled\\n\"\n"
"STL_CLIENTISMUTEDPERMANENTLY \"%s was muted permanently\\n\"\n"
"STL_CLIENTISMUTED \"%s was muted\\n\"\n"
"STL_CLIENTISSTILLMUTED \"%s is muted (still)\\n\"\n"
"STL_YOUAREMUTED \"%s is muted\\n\"\n"
"STL_YOUARNTMUTED \"You are no longer muted\\n\"\n"
"STL_NONAMEASMUTE \"Muted players may not change their names\\n\"\n"
"STL_MUTEDVOTE \"Sorry, you cannot vote when muted as it may allow you to send a message.\\n\"\n"
"STL_MUTEDCHAT \"You cannot chat while muted\\n\"\n"
"STL_FLOODPROTACTIVE \"floodprot: You can't talk for %i seconds\\n\"\n"
"STL_FLOODPROTTIME \"You can't talk for %i more seconds\\n\"\n"
"STL_BUFFERPROTECTION \"buffer overflow protection: failiure\\n\"\n"
"STL_FIRSTGREETING \"Welcome %s. Your time on this server is being logged and ranked\\n\"\n"
"STL_SHORTGREETING \"Welcome back %s. You have previously spent %i mins connected\\n\"\n"
"STL_BIGGREETING \"Welcome back %s. You have previously spent %i:%i hours connected\\n\"\n"
"STL_POSSIBLEMODELCHEAT \"warning: %s eyes or player model does not match\\n\"\n"
"STL_MAPCHEAT \"Map model file does not match (%s), %i != %i/%i.\\nYou may need a new version of the map, or the proper install files.\\n\"\n"
"STL_INVALIDTRACKCLIENT \"invalid player to track\\n\"\n"
"STL_BADNAME \"Can't change name - new is invalid\\n\"\n"
"STL_CLIENTNAMECHANGE \"%s changed their name to %s\\n\"\n"
"STL_SERVERPAUSED \"server is paused\\n\"\n"
"STL_UPLOADDENIED \"Upload denied\\n\"\n"
"STL_NAMEDCLIENTDOESNTEXIST \"client does not exist\\n\"\n"
"STL_NOSUICIDEWHENDEAD \"Can't suicide -- Already dead\\n\"\n"
"STL_CANTPAUSE \"Can't pause. Not allowed\\n\"\n"
"STL_CANTPAUSESPEC \"Spectators may not pause the game\\n\"\n"
"STL_CLIENTPAUSED \"%s paused the game\\n\"\n"
"STL_CLIENTUNPAUSED \"%s unpaused the game\\n\"\n"
"STL_CLIENTLESSUNPAUSE \"pause released due to empty server\\n\"\n"
"STL_CURRENTRATE \"current rate is %i\\n\"\n"
"STL_RATESETTO \"rate is changed to %i\\n\"\n"
"STL_CURRENTMSGLEVEL \"current msg level is %i\\n\"\n"
"STL_MSGLEVELSET \"new msg level set to %i\\n\"\n"
"STL_GAMESAVED \"Server has saved the game\\n\"\n"
"STL_CLIENTDROPPED \"%s dropped\\n\"\n"
"STL_SNAPREFUSED \"%s refused remote screenshot\\n\"\n"
"STL_FINALVOTE \"%s casts final vote for '%s'\\n\"\n"
"STL_VOTE \"%s casts a vote for '%s'\\n\"\n"
"STL_SPEEDCHEATKICKED \"%s was kicked for speedcheating (%s)\\n\"\n"
"STL_SPEEDCHEATPOSSIBLE \"Speed cheat possibility, analyzing:\\n %d %.1f %d for: %s\\n\"\n"
"STL_INITED \"======== %s Initialized ========\\n\"\n"
"STL_BACKBUFSET \"WARNING %s: [SV_New] Back buffered (%d0, clearing)\\n\"\n"
"STL_MESSAGEOVERFLOW \"WARNING: backbuf [%d] reliable overflow for %s\\n\"\n"
"STL_BUILDINGPHS \"Building PHS...\\n\"\n"
"STL_PHSINFO \"Average leafs visible / hearable / total: %i / %i / %i\\n\"\n"
"STL_BREAKSTATEMENT \"Break Statement\\n\"\n"
"STL_BADSPRINT \"tried to sprint to a non-client\\n\"\n"
"STL_NOPRECACHE \"no precache: %s\\n\"\n"
"STL_CANTFREEWORLD \"cannot free world entity\\n\"\n"
"STL_CANTFREEPLAYERS \"cannot free player entities\\n\"\n"
"STL_COMPILEROVER \"Compile took %f secs\\n\"\n"
"STL_EDICTWASFREE \"%s edict was free\\n\"\n"
"STL_NOFREEEDICTS \"WARNING: no free edicts\\n\"\n"
"STL_NEEDCHEATPARM \"You must run the server with -cheats to enable this command.\\n\"\n"
"STL_USERDOESNTEXIST \"Couldn't find user number %s\\n\"\n"
"STL_MAPCOMMANDUSAGE \"map <levelname> : continue game on a new level\\n\"\n"
"STL_NOVOTING \"Voting was dissallowed\\n\"\n"
"STL_BADVOTE \"You arn't allowed to vote for that\\n\"\n"
"STL_VOTESREMOVED \"All votes removed.\\n\"\n"
"STL_OLDVOTEREMOVED \"Old vote removed.\\n\"\n"
"TL_EXECING \"execing %s\\n\"\n"
"TL_EXECCOMMANDUSAGE \"exec <filename> : execute a script file\\n\"\n"
"TL_EXECFAILED \"couldn't exec %s\\n\"\n"
"TL_FUNCOVERFLOW \"%s: overflow\\n\"\n"
"TL_CURRENTALIASCOMMANDS \"Current alias commands:\\n\"\n"
"TL_ALIASNAMETOOLONG \"Alias name is too long\\n\"\n"
"TL_ALIASRESTRICTIONLEVELERROR \"Alias is already bound with a higher restriction\\n\"\n"
"TL_ALIASLEVELCOMMANDUSAGE \"aliaslevel <var> [execlevel]\\n\"\n"
"TL_ALIASNOTFOUND \"Alias not found\\n\"\n"
"TL_ALIASRAISELEVELERROR \"You arn't allowed to raise a command above your own level\\n\"\n"
"TL_ALIASRESTRICTIONLEVELWARN \"WARNING: %s is available to all clients, any client will be able to use it at the new level.\\n\"\n"
"TL_ALIASRESTRICTLEVEL \"alias %s is set to run at the user level of %i\\n\"\n"
"TL_ALIASLIST \"Alias list:\\n\"\n"
"TL_COMMANDLISTHEADER \"Command list:\\n\"\n"
"TL_CVARLISTHEADER \"CVar list:\\n\"\n"
"TL_RESTRICTCOMMANDRAISE \"You arn't allowed to raise a command above your own level\\n\"\n"
"TL_RESTRICTCOMMANDTOOHIGH \"You arn't allowed to alter a level above your own\\n\"\n"
"TL_RESTRICTCURRENTLEVEL \"%s is restricted to %i\\n\"\n"
"TL_RESTRICTCURRENTLEVELDEFAULT \"%s is restricted to rcon_level (%i)\\n\"\n"
"TL_RESTRICTNOTDEFINED \"restrict: %s not defined\\n\"\n"
"TL_WASRESTIRCTED \"%s was restricted.\\n\"\n"
"TL_COMMANDNOTDEFINED \"Unknown command \\\"%s\\\"\\n\"\n"
"TL_IFSYNTAX \"if <condition> <statement> [elseif <condition> <statement>] [...] [else <statement>]\\n\"\n"
"TL_IFSYNTAXERROR \"Not terminated\\n\"\n"
"TL_SETSYNTAX \"set <var> <equation>\\n\"\n"
"TL_CANTXNOTCONNECTED \"Can't \\\"%s\\\", not connected\\n\"\n"
"TL_SHAREWAREVERSION \"Playing shareware version.\\n\"\n"
"TL_REGISTEREDVERSION \"Playing registered version.\\n\"\n"
"TL_CURRENTSEARCHPATH \"Current search path:\\n\"\n"
"TL_SERACHPATHISPACK \"%s (%i files)\\n\"\n"
"TL_SERACHPATHISZIP \"%s (%i files)\\n\"\n"
"TL_COMPRESSEDFILEOPENFAILED \"Tried opening a handle to a compressed stream - %s\\n\"\n"
"TL_ADDEDPACKFILE \"Added packfile %s (%i files)\\n\"\n"
"TL_COULDNTOPENZIP \"Failed opening zipfile \\\"%s\\\" corrupt?\\n\"\n"
"TL_ADDEDZIPFILE \"Added zipfile %s (%i files)\\n\"\n"
"TL_GAMEDIRAINTPATH \"Gamedir should be a single filename, not a path\\n\"\n"
"TL_KEYHASSLASH \"Can't use a key with a \\\\\\n\"\n"
"TL_KEYHASQUOTE \"Can't use a key with a \\\"\\n\"\n"
"TL_KEYTOOLONG \"Keys and values must be < 64 characters.\\n\"\n"
"TL_INFOSTRINGTOOLONG \"Info string length exceeded\\n\"\n"
"TL_STARKEYPROTECTED \"Can't set * keys\\n\"\n"
"TL_KEYHASNOVALUE \"MISSING VALUE\\n\"\n"
"TL_OVERSIZEPACKETFROM \"Warning: Oversize packet from %s\\n\"\n"
"TL_CONNECTIONLOSTORABORTED \"Connection lost or aborted\\n\"\n"
"TL_NETGETPACKETERROR \"NET_GetPacket: %s\\n\"\n"
"TL_NETSENDERROR \"NET_SendPacket ERROR: %i\\n\"\n"
"TL_NETBINDINTERFACE \"Binding to IP Interface Address of %s\\n\"\n"
"TL_IPADDRESSIS \"IP address %s\\n\"\n"
"TL_CLIENTPORTINITED \"Client port Initialized\\n\"\n"
"TL_OUTMESSAGEOVERFLOW \"%s:Outgoing message overflow\\n\"\n"
"TL_OUTOFORDERPACKET \"%s:Out of order packet %i at %i\\n\"\n"
"TL_DROPPEDPACKETCOUNT \"%s:Dropped %i packets at %i\\n\"\n"
"STL_SERVERUNSPAWNED \"Server ended\\n\"\n"
"STL_SERVERSPAWNED \"Server spawned.\\n\"\n"
"TL_EXEDATETIME \"Exe: %s %s\\n\"\n"
"TL_HEAPSIZE \"%4.1f megs RAM available.\\n\"\n"
"TL_VERSION \"\\n%s Build %i\\n\\n\"\n"
"STL_SAVESYNTAX \"save <savename> : save a game\\n\"\n"
"STL_NORELATIVEPATHS \"Relative pathnames are not allowed.\\n\"\n"
"STL_SAVEGAMETO \"Saving game to %s...\\n\"\n"
"STL_ERRORCOULDNTOPEN \"ERROR: couldn't open.\\n\"\n"
"STL_SAVEDONE \"done.\\n\"\n"
"STL_LOADSYNTAX \"load <savename> : load a game\\n\"\n"
"STL_LOADGAMEFROM \"Loading game from %s...\\n\"\n"
"STL_BADSAVEVERSION \"Savegame is version %i, not %i\\n\"\n"
"STL_LOADFAILED \"Couldn't load map\\n\"\n"
"STL_NOMASTERMODE \"Setting nomaster mode.\\n\"\n"
"STL_MASTERAT \"Master server at %s\\n\"\n"
"STL_SENDINGPING \"Sending a ping.\\n\"\n"
"STL_SHUTTINGDOWN \"Shutting down.\\n\"\n"
"STL_LOGGINGOFF \"File logging off.\\n\"\n"
"STL_LOGGINGTO \"Logging text to %s.\\n\"\n"
"STL_FLOGGINGOFF \"Frag file logging off.\\n\"\n"
"STL_FLOGGINGFAILED \"Can't open any logfiles.\\n\"\n"
"STL_FLOGGINGTO \"Logging frags to %s.\\n\"\n"
"STL_USERIDNOTONSERVER \"Userid %i is not on the server\\n\"\n"
"STL_CANTFINDMAP \"Can't find %s\\n\"\n"
"STL_SERVERINFOSETTINGS \"Server info settings:\\n\"\n"
"STL_SERVERINFOSYNTAX \"usage: serverinfo [ <key> <value> ]\\n\"\n"
"STL_LOCALINFOSETTINGS \"Local info settings:\\n\"\n"
"STL_LOCALINFOSYNTAX \"usage: localinfo [ <key> <value> ]\\n\"\n"
"STL_USERINFOSYNTAX \"Usage: info <userid>\\n\"\n"
"STL_NONEGATIVEVALUES \"All values must be positive numbers\\n\"\n"
"STL_CURRENTGAMEDIR \"Current gamedir: %s\\n\"\n"
"STL_SVGAMEDIRUSAGE \"Usage: sv_gamedir <newgamedir>\\n\"\n"
"STL_GAMEDIRCANTBEPATH \"*Gamedir should be a single filename, not a path\\n\"\n"
"STL_GAMEDIRUSAGE \"Usage: gamedir <newgamedir>\\n\"\n"
"STL_SNAPTOOMANYFILES \"Snap: Couldn't create a file, clean some out.\\n\"\n"
"STL_SNAPREQUEST \"Requesting snap from user %d...\\n\"\n"
"STL_SNAPUSAGE \"Usage: snap <userid>\\n\"\n"
"TLC_BADSERVERADDRESS \"Bad server address\\n\"\n"
"TLC_ILLEGALSERVERADDRESS \"Illegal server address\\n\"\n"
"TLC_CONNECTINGTO \"Connecting to %s...\\n\"\n"
"TLC_SYNTAX_CONNECT \"usage: connect <server>\\n\"\n"
"TLC_NORCONPASSWORD \"'rcon_password' is not set.\\n\"\n"
"TLC_NORCONDEST \"You must either be connected,\\nor set the 'rcon_address' cvar\\nto issue rcon commands\\n\"\n"
"TLC_SYNTAX_USER \"Usage: user <username / userid>\\n\"\n"
"TLC_USER_NOUSER \"User not in server.\\n\"\n"
"TLC_USERBANNER \"userid frags name\\n\"\n"
"TLC_USERBANNER2 \"------ ----- ----\\n\"\n"
"TLC_USERLINE \"%6i %4i %s\\n\"\n"
"TLC_USERTOTAL \"%i total users\\n\"\n"
"TLC_COLOURCURRENT \"\\\"color\\\" is \\\"%s %s\\\"\\n\"\n"
"TLC_SYNTAX_COLOUR \"color <0-13> [0-13]\\n\"\n"
"TLC_SYNTAX_FULLSERVERINFO \"usage: fullserverinfo <complete info string>\\n\"\n"
"TLC_SERVER_VERSION \"Version %1.2f Server\\n\"\n"
"TLC_SYNTAX_FULLINFO \"fullinfo <complete info string>\\n\"\n"
"TLC_SYNTAX_SETINFO \"usage: setinfo [ <key> <value> ]\\n\"\n"
"TLC_PACKET_SYNTAX \"packet <destination> <contents>\\n\"\n"
"TLC_BADADDRESS \"Bad address\\n\"\n"
"TLC_CHANGINGMAP \"\\nChanging map...\\n\"\n"
"TLC_RECONNECTING \"reconnecting...\\n\"\n"
"TLC_RECONNECT_NOSERVER \"No server to reconnect to...\\n\"\n"
"TLC_VERSIONST \"%s Build %i\n\"\n"
"TL_ST_COLON \"%s: \"\n"
"TLC_GOTCONNECTION \"connection\\n\"\n"
"TLC_DUPCONNECTION \"Dup connect received. Ignored.\\n\"\n"
"TLC_CONNECTED \"Connected.\\n\"\n"
"TLC_CONLESS_CONCMD \"client command\\n\"\n"
"TLC_CMDFROMREMOTE \"Command packet from remote host. Ignored.\\n\"\n"
"TLC_LOCALID_NOTSET \""CON_ERROR"Command packet received from local host, but no localid has been set. You may need to upgrade your server browser.\\n\"\n"
"TLC_LOCALID_BAD \""CON_ERROR"Invalid localid on command packet received from local host. \\n|%s| != |%s|\\nYou may need to reload your server browser and QuakeWorld.\\n\"\n"
"TLC_A2C_PRINT \"print\\n\"\n"
"TLC_A2A_PING \"ping\\n\"\n"
"TLC_S2C_CHALLENGE \"challenge\\n\"\n"
"TLC_CONLESSPACKET_UNKNOWN \"unknown connectionless packet: %c\\n\"\n"
"TL_RUNTPACKET \"%s: Runt packet\\n\"\n"
"TLC_SERVERTIMEOUT \"\\nServer connection timed out.\\n\"\n"
"TLC_CONNECTFIRST \"Must be connected.\\n\"\n"
"TLC_SYNTAX_DOWNLOAD \"Usage: download <datafile>\\n\"\n"
"TLC_REQUIRESSERVERMOD \"%s is only available with server support\\n\"\n"
"TLC_CLIENTCON_ERROR_ENDGAME \""CON_ERROR"Host_EndGame: %s\\n\"\n"
"TLC_HOSTFATALERROR \"Host_Error: %s\\n\"\n"
"TLC_CONFIGCFG_WRITEFAILED \"Couldn't write config.cfg.\\n\"\n"
"TLC_HOSTSPEEDSOUTPUT \"%3i tot %3i server %3i gfx %3i snd\\n\"\n"
"TLC_QUAKEWORLD_INITED \"^Ue080^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081 %s Initialized ^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue082\\n\"\n"
"TLC_DEDICATEDCANNOTCONNECT \"Connect ignored - dedicated. set a renderer first\\n\"\n"
"TLC_Q2CONLESSPACKET_UNKNOWN \"unknown connectionless packet for q2: %s\\n\"\n"
"TL_NORELATIVEPATHS \"Refusing to download a path with ..\\n\"\n"
"TL_NODOWNLOADINDEMO \"Unable to download %s in record mode.\\n\"\n"
"TL_DOWNLOADINGFILE \"Downloading %s...\\n\"\n"
"TLC_CHECKINGMODELS \"Checking models...\\n\"\n"
"TLC_CHECKINGSOUNDS \"Checking sounds...\\n\"\n"
"TL_FILENOTFOUND \"File not found.\\n\"\n"
"TL_CLS_DOWNLOAD_ISSET \"cls.download shouldn't have been set\\n\"\n"
"TL_FAILEDTOOPEN \"Failed to open %s\\n\"\n"
"TL_RENAMEFAILED \"failed to rename.\\n\"\n"
"TL_UPLOADCOMPLEATE \"Upload completed\\n\"\n"
"TL_FTEEXTENSIONS \"Using FTE extensions 0x%x%x\\n\"\n"
"TLC_LINEBREAK_NEWLEVEL \"\\n\\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\\n\\n\"\n"
"TLC_PC_PS_NL \"%c%s\\n\"\n"
"TLC_NOQ2CINEMATICSSUPPORT \"Cinematics on q2 levels is not yet supported\\nType 'cmd nextserver %i' to proceed.\"\n"
"TLC_GOTSVDATAPACKET \"Serverdata packet received.\\n\"\n"
"TLC_BAD_MAXCLIENTS \"Bad maxclients from server\\n\"\n"
"TLC_TOOMANYMODELPRECACHES \"Server sent too many model precaches\\n\"\n"
"TLC_TOOMANYSOUNDPRECACHES \"Server sent too many sound precaches\\n\"\n"
"TLC_PARSESTATICWITHNOMAP \"Warning: Parsestatic and no map loaded yet\\n\"\n"
"TL_FILE_X_MISSING \"\\nThe required model file '%s' could not be found or downloaded.\\n\\n\"\n"
"TL_GETACLIENTPACK \"You may need to download or purchase a %s client or map pack in order to play on this server.\\n\\n\"\n"
"TLC_LINEBREAK_MINUS \"------------------\\n\"\n"
"TL_INT_SPACE \"%i \"\n"
;
//client may remap messages from the server to a regional bit of text.
//server may remap progs messages
@ -262,520 +10,133 @@ static char *defaultlanguagetext =
char sys_language[64] = "";
cvar_t language = SCVAR("language", sys_language);
char lastlang[9];
typedef struct trans_s {
char *english;
char *foreign;
struct trans_s *next;
} trans_t;
trans_t *firsttranslation;
void TranslateReset(void)
void TL_LanguageChanged(struct cvar_s *var, char *oldvalue)
{
trans_t *trans;
char *f, *eng, *fore;
// FILE *F;
char *s, *s1, *s2;
/*
if (*lastlang)
{
//write
F = fopen(va("%s/%s.lng", com_gamedir, lastlang), "wb");
if (F)
{
for (trans = firsttranslation; trans; trans=trans->next)
{
if (strchr(trans->english, '\n') || strchr(trans->english, '\"') || strchr(trans->english, '\\') || strchr(trans->english, '\t'))
{
s = trans->english;
fputc('"', F);
while(*s)
{
if (*s == '\n')
fprintf(F, "\\n");
else if (*s == '\\')
fprintf(F, "\\\\");
else if (*s == '\"')
fprintf(F, "\"");
else if (*s == '\t')
fprintf(F, "\\t");
else
fputc(*s, F);
s++;
}
fputc('"', F);
}
else
fprintf(F, "\"%s\"", trans->english);
fputc(' ', F);
if (strchr(trans->foreign, '\n') || strchr(trans->foreign, '\"') || strchr(trans->foreign, '\\') || strchr(trans->foreign, '\t'))
{
s = trans->foreign;
fputc('"', F);
while(*s)
{
if (*s == '\n')
fprintf(F, "\\n");
else if (*s == '\\')
fprintf(F, "\\\\");
else if (*s == '\"')
fprintf(F, "\"");
else if (*s == '\t')
fprintf(F, "\\t");
else
fputc(*s, F);
s++;
}
fputc('"', F);
fputc('\n', F);
}
else
fprintf(F, "\"%s\"\n", trans->foreign);
}
fclose(F);
}
}*/
Q_strncpyz(lastlang, language.string, 8);
if (*language.string)
{
firsttranslation = NULL;
//read in
f = COM_LoadTempFile(va("%s.lng", lastlang));
s = f;
next:
while (s && *s)
{
if (*s == '\"')
{
s++;
eng = s;
while(*s)
{
if (*s == '\"')
{
*s = '\0'; //end of from
s++;
while (*s)
{
if (*s == '\"')
{
s++;
fore = s;
while(*s)
{
if (*s == '\"')
{
*s = '\0'; //end of to
s++;
if (!firsttranslation)
trans = firsttranslation = Z_Malloc(sizeof(trans_t)+strlen(eng)+strlen(fore)+2);
else
{
for (trans = firsttranslation; trans->next; trans=trans->next) ;
trans = (trans->next = Z_Malloc(sizeof(trans_t)+strlen(eng)+strlen(fore)+2));
}
trans->english = (char *)(trans+1);
trans->foreign = trans->english + strlen(eng) + 1;
s1 = trans->english;
s2 = eng;
while(*s2)
{
if (*s2 == '\\')
{
s2++;
switch(*s2)
{
case 'n':
*s1 = '\n';
break;
case '\"':
*s1 = '\"';
break;
case 't':
*s1 = '\t';
break;
case '\\':
*s1 = '\\';
break;
default:
*s1 = '?';
break;
}
}
else
*s1 = *s2;
s1++;
s2++;
}
//strcpy(trans->english, eng);
s1 = trans->foreign;
s2 = fore;
while(*s2)
{
if (*s2 == '\\')
{
s2++;
switch(*s2)
{
case 'n':
*s1 = '\n';
break;
case '\"':
*s1 = '\"';
break;
case 't':
*s1 = '\t';
break;
case '\\':
*s1 = '\\';
break;
default:
*s1 = '?';
break;
}
}
else
*s1 = *s2;
s1++;
s2++;
}
// strcpy(trans->foreign, fore);
goto next;
}
else if (*s == '\\') //skip
s++;
s++;
}
}
else if (*s == '\\') //skip
s++;
s++;
}
}
else if (*s == '\\') //skip
s++;
s++;
}
}
else if (*s == '\\') //skip
s++;
s++;
}
}
#ifndef CLIENTONLY
svs.language = TL_FindLanguage(var->string);
#endif
#ifndef SERVERONLY
cls.language = TL_FindLanguage(var->string);
#endif
}
char *Translate(char *message)
{
return message;
//this is pointless.
/* trans_t *trans;
if (!*message)
return message;
if (Q_strncmp(language.string, lastlang, 8))
{
TranslateReset();
}
for (trans = firsttranslation; trans; trans=trans->next)
{
if (*trans->english == *message) //it's a little faster
if (!Q_strcmp(trans->english+1, message+1))
return trans->foreign;
}
//add translation info to data
if (!firsttranslation)
trans = firsttranslation = Z_Malloc(sizeof(trans_t) + strlen(message)+1);
else
{
for (trans = firsttranslation; trans->next; trans=trans->next) ;
trans = (trans->next = Z_Malloc(sizeof(trans_t) + strlen(message)+1));
}
trans->english = (char *)(trans+1);
trans->foreign = (char *)(trans+1);
strcpy(trans->english, message);
//strcpy(trans->foreign, message);
return message;
*/
}
char *untranslate(char *message)
{
return message;
}
cvar_t language = CVARFC("lang", sys_language, CVAR_USERINFO, TL_LanguageChanged);
void TranslateInit(void)
{
Cvar_Register(&language, "International variables");
}
char *languagetext[STL_MAXSTL][MAX_LANGUAGES];
void TL_ParseLanguage (char *name, char *data, int num) //this is one of the first functions to be called. so it mustn't use any quake subsystem routines
{
int i;
char *s;
s = data;
while(s)
{
s = COM_Parse(s);
if (!s)
return;
for (i = 0; i < STL_MAXSTL; i++)
{
if (!strcmp(com_token, langtext(i, 0))) //lang 0 is actually the string names.
break;
}
s = COM_ParseCString(s, com_token, sizeof(com_token), NULL);
if (i == STL_MAXSTL) //silently ignore - allow other servers or clients to add stuff
continue;
langtext(i, num) = malloc(strlen(com_token)+1);
strcpy(langtext(i, num), com_token);
// langtext(i, num) = "";
}
}
void TL_LoadLanguage (char *name, char *shortname, int num) //this is one of the first functions to be called.
{
#ifdef FTE_TARGET_WEB
return;
#else
FILE *f;
int size;
char *buffer;
size_t result;
f = fopen(va("%s.trl", shortname), "rb");
if (!f)
return;
fseek(f, 0, SEEK_END);
size = ftell(f);
fseek(f, 0, SEEK_SET);
buffer = malloc(size+1);
buffer[size] = '\0';
result = fread(buffer, 1, size, f); // do something with result
if (result != size)
Con_Printf("TL_LoadLanguage() fread: Filename: %s, expected %i, result was %u\n",va("%s.trl", shortname),size,(unsigned int)result);
fclose(f);
TL_ParseLanguage(name, buffer, num);
free(buffer);
#endif
}
#ifdef _DEBUG
#define CONVERTDEFAULT
#endif
#ifdef CONVERTDEFAULT
char *TL_ExpandToCString(char *in)
{
static char buffer[2048];
char *out = buffer;
while(*in)
{
if (*in == '\"' || *in == '\\')
{
*out++ = '\\';
*out = *in;
}
else if (*in == '\n')
{
*out++ = '\\';
*out++ = 'n';
*out++ = '\"';
*out++ = '\n';
*out = '\"';
}
/* else if (*in == '\t')
{
*out++ = '\\';
*out = '\t';
}*/
else if (*in == '\r')
{
in++;
continue;
}
else
{
*out = *in;
}
out++;
in++;
}
*out = '\0';
return buffer;
}
char *TL_ExpandToDoubleCString(char *in) //TL_ExpandToCString twice
{
static char buffer[2048];
char *out = buffer;
while(*in)
{
if (*in == '\"' || *in == '\\')
{
*out++ = '\\';
*out = *in;
}
else if (*in == '\n')
{
*out++ = '\\';
*out = 'n';
}
else
{
*out = *in;
}
out++;
in++;
}
*out = '\0';
return TL_ExpandToCString(buffer);
}
void TL_WriteTLHeader(void)
{
/*
int i;
FILE *f;
f = fopen("tlout.h", "wb");
if (!f)
return;
for (i = 0; i < STL_MAXSTL; i++)
{
if (langtext(i, 1))
{
fprintf(f, "\"%s \\\"%s\\\"\\n\"\n", langtext(i, 0), TL_ExpandToDoubleCString(langtext(i, 1)));
}
}
fclose(f);*/
}
#endif
void TL_Shutdown(void)
{
int i, j, k;
int j;
for (i = 0; i < STL_MAXSTL; i++)
for (j = 0; j < MAX_LANGUAGES; j++)
{
for (j = 0; j < MAX_LANGUAGES; j++)
{
if (j)
free(langtext(i, j));
for (k = j+1; k < MAX_LANGUAGES; k++)
{
if (langtext(i, k) == langtext(i, j))
langtext(i, k) = NULL;
}
langtext(i, j) = NULL;
}
if (!languages[j].name)
continue;
free(languages[j].name);
languages[j].name = NULL;
PO_Close(languages[j].po);
languages[j].po = NULL;
}
}
static int TL_LoadLanguage(char *lang)
{
vfsfile_t *f;
int j;
char *u;
for (j = 0; j < MAX_LANGUAGES; j++)
{
if (!languages[j].name)
break;
if (!stricmp(languages[j].name, lang))
return j;
}
//err... oops, ran out of languages...
if (j == MAX_LANGUAGES)
return 0;
if (*lang)
f = FS_OpenVFS(va("fteqw.%s.po", lang), "rb", FS_BINARYPATH);
else
f = NULL;
if (!f && *lang)
{
//keep truncating until we can find a name that works
u = strrchr(lang, '_');
if (u)
*u = 0;
else
lang = "";
return TL_LoadLanguage(lang);
}
languages[j].name = strdup(lang);
languages[j].po = f?PO_Load(f):NULL;
return j;
}
int TL_FindLanguage(const char *lang)
{
char trimname[64];
Q_strncpyz(trimname, lang, sizeof(trimname));
return TL_LoadLanguage(trimname);
}
//need to set up default languages for any early prints before cvars are inited.
void TL_InitLanguages(void)
{
int i, j;
int lang;
#define NAME(i) (languagetext[i][0] = #i);
#include "translate.h"
#undef NAME
/*
#define ENGLISH(i, s) (languagetext[i][1] = s)
#undef ENGLISH
*/
TL_ParseLanguage("English", defaultlanguagetext, 1);
TL_LoadLanguage("English", "english", 1);
TL_LoadLanguage("Spanish", "spanish", 2);
TL_LoadLanguage("Portuguese", "portu", 3);
TL_LoadLanguage("French", "french", 4);
int i;
char *lang;
//lang can override any environment or system settings.
if ((i = COM_CheckParm("-lang")))
lang = atoi(com_argv[i+1]);
Q_strncpyz(sys_language, com_argv[i+1], sizeof(sys_language));
else
lang = 1;
{
lang = NULL;
if (!lang)
lang = getenv("LANGUAGE");
if (!lang)
lang = getenv("LC_ALL");
if (!lang)
lang = getenv("LC_MESSAGES");
if (!lang)
lang = getenv("LANG");
if (!lang)
lang = "";
if (!strcmp(lang, "C") || !strcmp(lang, "POSIX"))
lang = "";
if (lang < 1)
lang = 1;
if (lang >= MAX_LANGUAGES)
lang = MAX_LANGUAGES-1;
//windows will have already set the locale from the windows settings, so only replace it if its actually valid.
if (*lang)
Q_strncpyz(sys_language, lang, sizeof(sys_language));
}
//clean it up.
//takes the form: [language[_territory][.codeset][@modifier]]
//we don't understand modifiers
lang = strrchr(sys_language, '@');
if (lang)
*lang = 0;
//we don't understand codesets sadly.
lang = strrchr(sys_language, '.');
if (lang)
*lang = 0;
//but we do support territories.
#ifndef CLIENTONLY
svs.language = lang;
svs.language = TL_FindLanguage(sys_language);
#endif
#ifndef SERVERONLY
cls.language = lang;
cls.language = TL_FindLanguage(sys_language);
#endif
#ifdef CONVERTDEFAULT
TL_WriteTLHeader();
#endif
// Sys_Printf("-lang %i\n", lang);
for (i = 0; i < STL_MAXSTL; i++)
{
if (!langtext(i, 1))
{
Sys_Printf("warning: default translation for %s isn't set\n", langtext(i, 0));
langtext(i, 1) = "";
}
}
if (COM_CheckParm("-langugly")) //so non-translated strings show more clearly (and you know what they are called).
{
for (j = 2; j < MAX_LANGUAGES; j++)
for (i = 0; i < STL_MAXSTL; i++)
{
if (!langtext(i, j))
{
langtext(i, j) = langtext(i, 0);
}
}
}
else
{
for (j = 2; j < MAX_LANGUAGES; j++)
for (i = 0; i < STL_MAXSTL; i++)
{
if (!langtext(i, j))
{
langtext(i, j) = langtext(i, 1);
}
}
}
//make sure a fallback exists, but not as language 0
TL_FindLanguage("");
}
@ -934,6 +295,8 @@ struct po_s
const char *PO_GetText(struct po_s *po, const char *msg)
{
struct poline_s *line;
if (!po)
return msg;
line = Hash_Get(&po->hash, msg);
if (line)
return line->translated;
@ -950,21 +313,26 @@ static void PO_AddText(struct po_s *po, const char *orig, const char *trans)
memcpy(line->translated, trans, tlen);
trans = (const char*)(line->translated);
Hash_Add(&po->hash, orig, line, &line->buck);
line->next = po->lines;
po->lines = line;
}
struct po_s *PO_Load(vfsfile_t *file)
{
struct po_s *po;
unsigned int buckets = 1024;
char *in, *end;
char *instart, *in, *end;
int inlen;
char msgid[32768];
char msgstr[32768];
qboolean allowblanks = !!COM_CheckParm("-translatetoblank");
po = Z_Malloc(sizeof(*po) + Hash_BytesForBuckets(buckets));
Hash_InitTable(&po->hash, buckets, po+1);
inlen = file?VFS_GETLEN(file):0;
in = BZ_Malloc(inlen+1);
instart = in = BZ_Malloc(inlen+1);
if (file)
VFS_READ(file, in, inlen);
in[inlen] = 0;
@ -1017,7 +385,7 @@ struct po_s *PO_Load(vfsfile_t *file)
break;
}
if (*msgid && start)
if ((*msgid && start) || allowblanks)
PO_AddText(po, msgid, msgstr);
}
else
@ -1029,10 +397,13 @@ struct po_s *PO_Load(vfsfile_t *file)
}
}
BZ_Free(instart);
return po;
}
void PO_Close(struct po_s *po)
{
if (!po)
return;
while(po->lines)
{
struct poline_s *r = po->lines;

View file

@ -1,275 +1,19 @@
#ifdef TRANSLATE_H
NAME(STL_LANGUAGENAME)
NAME(STL_CLIENTCONNECTED)
NAME(STL_SPECTATORCONNECTED)
NAME(STL_RECORDEDCLIENTCONNECTED)
NAME(STL_RECORDEDSPECTATORCONNECTED)
NAME(STL_CLIENTWASBANNED)
NAME(STL_YOUWEREBANNED)
NAME(STL_CLIENTTIMEDOUT)
NAME(STL_LOADZOMIBETIMEDOUT)
NAME(STL_CLIENTWASKICKED)
NAME(STL_YOUWEREKICKED)
NAME(STL_YOUWEREKICKEDNAMESPAM)
NAME(STL_CLIENTKICKEDNAMESPAM)
NAME(STL_GODON)
NAME(STL_GODOFF)
NAME(STL_NOCLIPON)
NAME(STL_NOCLIPOFF)
NAME(STL_CLIENTISCUFFEDPERMANENTLY)
NAME(STL_CLIENTISCUFFED)
NAME(STL_CLIENTISSTILLCUFFED)
NAME(STL_YOUARNTCUFFED)
NAME(STL_CLIENTISCRIPPLEDPERMANENTLY)
NAME(STL_CLIENTISCRIPPLED)
NAME(STL_CLIENTISSTILLCRIPPLED)
NAME(STL_YOUARNTCRIPPLED)
NAME(STL_CLIENTISMUTEDPERMANENTLY)
NAME(STL_CLIENTISMUTED)
NAME(STL_CLIENTISSTILLMUTED)
NAME(STL_YOUAREMUTED)
NAME(STL_YOUARNTMUTED)
NAME(STL_NONAMEASMUTE)
NAME(STL_MUTEDVOTE)
NAME(STL_MUTEDCHAT)
NAME(STL_FLOODPROTTIME)
NAME(STL_BUFFERPROTECTION)
NAME(STL_FIRSTGREETING)
NAME(STL_SHORTGREETING)
NAME(STL_BIGGREETING)
NAME(STL_POSSIBLEMODELCHEAT)
NAME(STL_MAPCHEAT)
NAME(STL_INVALIDTRACKCLIENT)
NAME(STL_CLIENTNAMECHANGE)
NAME(STL_SERVERPAUSED)
NAME(STL_UPLOADDENIED)
NAME(STL_NAMEDCLIENTDOESNTEXIST)
NAME(STL_NOSUICIDEWHENDEAD)
NAME(STL_CANTPAUSE)
NAME(STL_CANTPAUSESPEC)
NAME(STL_CLIENTPAUSED)
NAME(STL_CLIENTUNPAUSED)
NAME(STL_CLIENTLESSUNPAUSE)
NAME(STL_RATESETTO)
NAME(STL_CURRENTMSGLEVEL)
NAME(STL_MSGLEVELSET)
NAME(STL_CLIENTDROPPED)
NAME(STL_SNAPREFUSED)
NAME(STL_FINALVOTE)
NAME(STL_VOTE)
NAME(STL_SPEEDCHEATKICKED)
NAME(STL_SPEEDCHEATPOSSIBLE)
NAME(STL_INITED)
NAME(STL_MESSAGEOVERFLOW)
NAME(STL_BUILDINGPHS)
NAME(STL_PHSINFO)
NAME(STL_BADSPRINT)
NAME(STL_NOPRECACHE)
NAME(STL_CANTFREEWORLD)
NAME(STL_CANTFREEPLAYERS)
NAME(STL_COMPILEROVER)
NAME(STL_EDICTWASFREE)
NAME(STL_NEEDCHEATPARM)
NAME(STL_USERDOESNTEXIST)
NAME(STL_MAPCOMMANDUSAGE)
NAME(STL_NOVOTING)
NAME(STL_BADVOTE)
NAME(STL_VOTESREMOVED)
NAME(STL_OLDVOTEREMOVED)
NAME(TL_EXECING)
NAME(TL_EXECCOMMANDUSAGE)
NAME(TL_EXECFAILED)
NAME(TL_FUNCOVERFLOW)
NAME(TL_CURRENTALIASCOMMANDS)
NAME(TL_ALIASNAMETOOLONG)
NAME(TL_ALIASRESTRICTIONLEVELERROR)
NAME(TL_ALIASLEVELCOMMANDUSAGE)
NAME(TL_ALIASNOTFOUND)
NAME(TL_ALIASRAISELEVELERROR)
NAME(TL_ALIASRESTRICTIONLEVELWARN)
NAME(TL_ALIASRESTRICTLEVEL)
NAME(TL_ALIASLIST)
NAME(TL_COMMANDLISTHEADER)
NAME(TL_CVARLISTHEADER)
NAME(TL_RESTRICTCOMMANDRAISE)
NAME(TL_RESTRICTCOMMANDTOOHIGH)
NAME(TL_RESTRICTCURRENTLEVEL)
NAME(TL_RESTRICTCURRENTLEVELDEFAULT)
NAME(TL_RESTRICTNOTDEFINED)
NAME(TL_WASRESTIRCTED)
NAME(TL_COMMANDNOTDEFINED)
NAME(TL_IFSYNTAX)
NAME(TL_IFSYNTAXERROR)
NAME(TL_SETSYNTAX)
NAME(TL_CANTXNOTCONNECTED)
NAME(TL_REGISTEREDVERSION)
NAME(TL_CURRENTSEARCHPATH)
NAME(TL_ADDEDPACKFILE)
NAME(TL_COULDNTOPENZIP)
NAME(TL_ADDEDZIPFILE)
NAME(TL_OVERSIZEPACKETFROM)
NAME(TL_CONNECTIONLOSTORABORTED)
NAME(TL_NETGETPACKETERROR)
NAME(TL_NETSENDERROR)
NAME(TL_NETBINDINTERFACE)
NAME(TL_IPADDRESSIS)
NAME(TL_CLIENTPORTINITED)
NAME(TL_OUTMESSAGEOVERFLOW)
NAME(TL_OUTOFORDERPACKET)
NAME(TL_DROPPEDPACKETCOUNT)
NAME(STL_SERVERUNSPAWNED)
NAME(STL_SERVERSPAWNED)
NAME(TL_EXEDATETIME)
//savegame.c
NAME(STL_SAVEGAMETO)
NAME(STL_ERRORCOULDNTOPEN)
NAME(STL_LOADGAMEFROM)
NAME(STL_BADSAVEVERSION)
NAME(STL_LOADFAILED)
//sv_ccmds.c
NAME(STL_SHUTTINGDOWN)
NAME(STL_FLOGGINGOFF)
NAME(STL_FLOGGINGFAILED)
NAME(STL_FLOGGINGTO)
NAME(STL_USERIDNOTONSERVER)
NAME(STL_CANTFINDMAP)
NAME(STL_SERVERINFOSETTINGS)
NAME(STL_SERVERINFOSYNTAX)
NAME(STL_LOCALINFOSETTINGS)
NAME(STL_LOCALINFOSYNTAX)
NAME(STL_USERINFOSYNTAX)
NAME(STL_CURRENTGAMEDIR)
NAME(STL_SVGAMEDIRUSAGE)
NAME(STL_GAMEDIRCANTBEPATH)
NAME(STL_GAMEDIRUSAGE)
NAME(STL_SNAPTOOMANYFILES)
NAME(STL_SNAPREQUEST)
NAME(STL_SNAPUSAGE)
NAME(TLC_BADSERVERADDRESS)
NAME(TLC_ILLEGALSERVERADDRESS)
NAME(TLC_CONNECTINGTO)
NAME(TLC_SYNTAX_CONNECT)
NAME(TLC_NORCONPASSWORD)
NAME(TLC_NORCONDEST)
NAME(TLC_SYNTAX_USER)
NAME(TLC_USER_NOUSER)
NAME(TLC_USERBANNER)
NAME(TLC_USERBANNER2)
NAME(TLC_USERLINE)
NAME(TLC_USERTOTAL)
NAME(TLC_COLOURCURRENT)
NAME(TLC_SYNTAX_COLOUR)
NAME(TLC_SYNTAX_FULLSERVERINFO)
NAME(TLC_SERVER_VERSION)
NAME(TLC_SYNTAX_FULLINFO)
NAME(TLC_SYNTAX_SETINFO)
NAME(TLC_PACKET_SYNTAX)
NAME(TLC_CHANGINGMAP)
NAME(TLC_RECONNECTING)
NAME(TLC_RECONNECT_NOSERVER)
NAME(TL_ST_COLON)
NAME(TLC_GOTCONNECTION)
NAME(TLC_DUPCONNECTION)
NAME(TLC_CONNECTED)
NAME(TLC_CONLESS_CONCMD)
NAME(TLC_CMDFROMREMOTE)
NAME(TLC_LOCALID_NOTSET)
NAME(TLC_LOCALID_BAD)
NAME(TLC_A2C_PRINT)
NAME(TLC_S2C_CHALLENGE)
NAME(TLC_CONLESSPACKET_UNKNOWN)
NAME(TL_RUNTPACKET)
NAME(TLC_SERVERTIMEOUT)
NAME(TLC_CONNECTFIRST)
NAME(TLC_SYNTAX_DOWNLOAD)
NAME(TLC_CLIENTCON_ERROR_ENDGAME)
NAME(TLC_HOSTFATALERROR)
NAME(TLC_CONFIGCFG_WRITEFAILED)
NAME(TLC_QUAKEWORLD_INITED)
NAME(TLC_DEDICATEDCANNOTCONNECT)
NAME(TLC_Q2CONLESSPACKET_UNKNOWN)
NAME(TL_NORELATIVEPATHS)
NAME(TL_NODOWNLOADINDEMO)
NAME(TL_DOWNLOADINGFILE)
NAME(TL_FILENOTFOUND)
NAME(TL_CLS_DOWNLOAD_ISSET)
NAME(TL_FAILEDTOOPEN)
NAME(TL_UPLOADCOMPLEATE)
NAME(TL_FTEEXTENSIONS)
NAME(TLC_LINEBREAK_NEWLEVEL)
NAME(TLC_PC_PS_NL)
NAME(TLC_GOTSVDATAPACKET)
NAME(TLC_TOOMANYMODELPRECACHES)
NAME(TLC_TOOMANYSOUNDPRECACHES)
NAME(TLC_PARSESTATICWITHNOMAP)
NAME(TLC_LINEBREAK_MINUS)
NAME(TL_INT_SPACE)
#else
#ifndef TRANSLATE_H
#define TRANSLATE_H
typedef enum {
#define NAME(s) s,
#include "translate.h"
#undef NAME
STL_MAXSTL
} translation_t;
typedef const char* translation_t;
#define MAX_LANGUAGES 64
void TranslateInit(void);
extern char *languagetext[STL_MAXSTL][MAX_LANGUAGES];
void SV_InitLanguages(void);
#define langtext(t,l) languagetext[t][l]
#define LANGDEFAULT 1
struct language_s
{
char *name;
struct po_s *po;
} languages[MAX_LANGUAGES];
#define langtext(t,l) PO_GetText(languages[l].po, t)
int TL_FindLanguage(const char *lang);
#endif

View file

@ -44,6 +44,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dedserver", "dedserver.vcpr
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "npfte", "npfte.vcproj", "{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "irc", "..\..\plugins\irc\irc.vcproj", "{6ABD62A3-C5A0-43E8-BA4F-84606057774F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
D3DDebug|Win32 = D3DDebug|Win32
@ -576,6 +578,42 @@ Global
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.Release|Win32.Build.0 = GLRelease|Win32
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.Release|x64.ActiveCfg = GLRelease|x64
{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1365}.Release|x64.Build.0 = GLRelease|x64
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.D3DDebug|Win32.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.D3DDebug|Win32.Build.0 = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.D3DDebug|x64.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.D3DRelease|Win32.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.D3DRelease|Win32.Build.0 = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.D3DRelease|x64.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Debug Dedicated Server|Win32.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Debug Dedicated Server|Win32.Build.0 = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Debug Dedicated Server|x64.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Debug|Win32.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Debug|Win32.Build.0 = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Debug|x64.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.GLDebug|Win32.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.GLDebug|Win32.Build.0 = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.GLDebug|x64.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.GLRelease|Win32.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.GLRelease|Win32.Build.0 = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.GLRelease|x64.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MDebug|Win32.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MDebug|Win32.Build.0 = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MDebug|x64.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MinGLDebug|Win32.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MinGLDebug|Win32.Build.0 = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MinGLDebug|x64.ActiveCfg = Debug|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MinGLRelease|Win32.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MinGLRelease|Win32.Build.0 = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MinGLRelease|x64.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MRelease|Win32.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MRelease|Win32.Build.0 = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.MRelease|x64.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release Dedicated Server|Win32.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release Dedicated Server|Win32.Build.0 = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release Dedicated Server|x64.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release|Win32.ActiveCfg = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release|Win32.Build.0 = Release|Win32
{6ABD62A3-C5A0-43E8-BA4F-84606057774F}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -586,6 +624,7 @@ Global
{873CCE24-3549-49D4-A4B4-653F91B1532A} = {8CED01C6-2C61-4EC5-90B6-574D9756D773}
{9767E236-8454-44E9-8999-CD5BDAFBE9BA} = {8CED01C6-2C61-4EC5-90B6-574D9756D773}
{72269FEE-293D-40BC-A7AE-E429F4496869} = {8CED01C6-2C61-4EC5-90B6-574D9756D773}
{6ABD62A3-C5A0-43E8-BA4F-84606057774F} = {8CED01C6-2C61-4EC5-90B6-574D9756D773}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
AMDCaProjectFile = C:\Games\Quake\wip\engine\dotnet2005\CodeAnalyst\ftequake.caw

View file

@ -615,6 +615,28 @@ static struct charcache_s *Font_GetChar(font_t *f, CHARIDXTYPE charidx)
//not cached, can't get.
c = Font_TryLoadGlyph(f, charidx);
if (!c && charidx >= 0x400 && charidx <= 0x45f)
{ //apparently there's a lot of russian players out there.
//if we just replace all their chars with a '?', they're gonna get pissed.
//so lets at least attempt to provide some default mapping that makes sense even if they don't have a full font.
//koi8-u is a mapping useful with 7-bit email because the message is still vaugely readable in latin if the high bits get truncated.
//not being a language specialist, I'm just going to use that mapping, with the high bit truncated to ascii (which mostly exists in the quake charset).
//this exact table is from ezquake. because I'm too lazy to figure out the proper mapping. (beware of triglyphs)
static char *wc2koi_table =
"?3??4?67??" "??" "??" ">?"
"abwgdevzijklmnop"
"rstufhc~{}/yx|`q"
"ABWGDEVZIJKLMNOP"
"RSTUFHC^[]_YX\\@Q"
"?#??$?&'??" "??" "??.?";
charidx = wc2koi_table[charidx - 0x400];
if (charidx != '?')
{
c = &f->chars[charidx];
if (c->texplane == INVALIDPLANE)
c = Font_TryLoadGlyph(f, charidx);
}
}
if (!c)
{
charidx = 0xfffd; //unicode's replacement char

View file

@ -279,11 +279,11 @@ iwboolean FTP_ClientConnThink (FTPclientconn_t *con) //true to kill con
if (qerrno == ECONNABORTED || qerrno == ECONNRESET)
{
Con_TPrintf (TL_CONNECTIONLOSTORABORTED);
Con_TPrintf ("Connection lost or aborted\n");
return true;
}
// Con_TPrintf (TL_NETGETPACKETERROR, strerror(qerrno));
// Con_Printf ("NET_GetPacket: %s\n", strerror(qerrno));
return true;
}

View file

@ -103,7 +103,7 @@ int FTP_BeginListening(int aftype, int port)
//ZOID -- check for interface binding option
if ((i = COM_CheckParm("-ip")) != 0 && i < com_argc) {
((struct sockaddr_in*)&address)->sin_addr.s_addr = inet_addr(com_argv[i+1]);
Con_TPrintf(TL_NETBINDINTERFACE,
Con_TPrintf("Binding to IP Interface Address of %s\n",
inet_ntoa(((struct sockaddr_in*)&address)->sin_addr));
} else
((struct sockaddr_in*)&address)->sin_addr.s_addr = INADDR_ANY;
@ -404,7 +404,7 @@ iwboolean FTP_ServerThinkForConnection(FTPclient_t *cl)
if (qerrno == ECONNABORTED || qerrno == ECONNRESET)
return true;
Con_TPrintf (TL_NETGETPACKETERROR, strerror(qerrno));
Con_Printf ("NET_GetPacket: %s\n", strerror(qerrno));
return true;
}
if (*cl->messagebuffer)
@ -954,12 +954,12 @@ unsigned long _true = true;
if (qerrno == ECONNABORTED || qerrno == ECONNRESET)
{
Con_TPrintf (TL_CONNECTIONLOSTORABORTED);
Con_TPrintf ("Connection lost or aborted\n");
return false;
}
Con_TPrintf (TL_NETGETPACKETERROR, strerror(qerrno));
Con_Printf ("NET_GetPacket: %s\n", strerror(qerrno));
return false;
}

View file

@ -150,7 +150,7 @@ qboolean HTTP_ServerInit(int port)
if ((i = COM_CheckParm("-ip")) != 0 && i < com_argc)
{
address.sin_addr.s_addr = inet_addr(com_argv[i+1]);
Con_TPrintf(TL_NETBINDINTERFACE,
Con_TPrintf("Binding to IP Interface Address of %s\n",
inet_ntoa(address.sin_addr));
}
else
@ -706,12 +706,12 @@ qboolean HTTP_ServerPoll(qboolean httpserverwanted, int portnum) //loop while tr
if (qerrno == ECONNABORTED || qerrno == ECONNRESET)
{
Con_TPrintf (TL_CONNECTIONLOSTORABORTED);
Con_TPrintf ("Connection lost or aborted\n");
return false;
}
Con_TPrintf (TL_NETGETPACKETERROR, strerror(qerrno));
Con_Printf ("NET_GetPacket: %s\n", strerror(qerrno));
return false;
}

View file

@ -11,10 +11,6 @@
#endif
#define Con_TPrintf IWebPrintf
#define TL_NETBINDINTERFACE "binding to %s"
#define TL_CONNECTIONLOSTORABORTED "connection lost or aborted"
#define TL_NETGETPACKETERROR "get packet error"
#define IWebPrintf printf
#define com_gamedir "." //current dir.

View file

@ -526,7 +526,7 @@ searchpathfuncs_t *QDECL FSPPAPI_OpenPath(vfsfile_t *mustbenull, const char *des
#else
this code is old and won't work.
//this code is old and won't work.
#define FSPPAPI_OpenTemp FS_OpenTemp
#define VFSPPAPI_Open VFSOS_Open

View file

@ -225,7 +225,7 @@ pbool PDECL ED_CanFree (edict_t *ed)
{
if (developer.value)
{
Con_TPrintf(STL_CANTFREEWORLD);
Con_TPrintf("cannot free world entity\n");
PR_StackTrace(svprogfuncs);
svprogfuncs->pr_trace = 1;
}
@ -233,7 +233,7 @@ pbool PDECL ED_CanFree (edict_t *ed)
}
if (NUM_FOR_EDICT(svprogfuncs, ed) <= sv.allocated_client_slots)
{
Con_TPrintf(STL_CANTFREEPLAYERS);
Con_TPrintf("cannot free player entities\n");
PR_StackTrace(svprogfuncs);
svprogfuncs->pr_trace = 1;
return false;
@ -1005,7 +1005,7 @@ progsnum_t AddProgs(char *name)
if (num == 0)
PR_LoadGlabalStruct();
Con_Printf("Loaded %s\n", name);
Con_TPrintf("Loaded progs %s\n", name);
PR_ProgsAdded(svprogfuncs, num, name);
@ -1102,7 +1102,7 @@ void PR_Compile_f(void)
time = Sys_DoubleTime() - time;
Con_TPrintf(STL_COMPILEROVER, time);
Con_TPrintf("Compile took %f secs\n", time);
}
void PR_ApplyCompilation_f (void)
@ -2289,14 +2289,14 @@ static void QCBUILTIN PF_setsize (pubprogfuncs_t *prinst, struct globalvars_s *p
{
if (progstype != PROG_H2)
{
Con_TPrintf(STL_EDICTWASFREE, "setsize");
Con_TPrintf("%s edict was free\n", "setsize");
prinst->pr_trace = 1;
}
return;
}
if (e->readonly)
{
Con_Printf("setsize on entity %i\n", e->entnum);
Con_TPrintf("setsize on entity %i\n", e->entnum);
return;
}
min = G_VECTOR(OFS_PARM1);
@ -2556,7 +2556,7 @@ static void QCBUILTIN PF_sprint (pubprogfuncs_t *prinst, struct globalvars_s *pr
if (entnum < 1 || entnum > sv.allocated_client_slots)
{
Con_TPrintf (STL_BADSPRINT);
Con_TPrintf ("tried to sprint to a non-client\n");
return;
}
@ -2605,7 +2605,7 @@ void PF_centerprint_Internal (int entnum, qboolean plaque, char *s)
if (entnum < 1 || entnum > sv.allocated_client_slots)
{
Con_TPrintf (STL_BADSPRINT);
Con_TPrintf ("tried to sprint to a non-client\n");
return;
}
@ -2934,7 +2934,7 @@ void PF_ambientsound_Internal (float *pos, char *samp, float vol, float attenuat
if (!*sv.strings.sound_precache[soundnum])
{
Con_TPrintf (STL_NOPRECACHE, samp);
Con_TPrintf ("no precache: %s\n", samp);
return;
}
@ -6169,7 +6169,7 @@ static void QCBUILTIN PF_readcmd (pubprogfuncs_t *prinst, struct globalvars_s *p
if (old != RD_NONE)
SV_EndRedirect();
SV_BeginRedirect(RD_OBLIVION, LANGDEFAULT);
SV_BeginRedirect(RD_OBLIVION, TL_FindLanguage(""));
Cbuf_Execute();
Q_strncpyz(output, outputbuf, sizeof(output));
SV_EndRedirect();

View file

@ -1116,7 +1116,7 @@ static qintptr_t syscallhandle (void *offset, quintptr_t mask, qintptr_t fn, con
if (old != RD_NONE)
SV_EndRedirect();
SV_BeginRedirect(RD_OBLIVION, LANGDEFAULT);
SV_BeginRedirect(RD_OBLIVION, TL_FindLanguage(""));
Cbuf_Execute();
Q_strncpyz(output, outputbuf, outputlen);
SV_EndRedirect();

View file

@ -74,13 +74,13 @@ void SV_Savegame_f (void)
if (Cmd_Argc() != 2)
{
Con_TPrintf (STL_SAVESYNTAX);
Con_Printf ("save <savename> : save a game\n");
return;
}
if (strstr(Cmd_Argv(1), ".."))
{
Con_TPrintf (STL_NORELATIVEPATHS);
Con_TPrintf ("Relative pathnames are not allowed\n");
return;
}
@ -93,11 +93,11 @@ void SV_Savegame_f (void)
sprintf (name, "%s/saves/%s", com_gamedir, Cmd_Argv(1));
COM_DefaultExtension (name, ".sav");
Con_TPrintf (STL_SAVEGAMETO, name);
Con_TPrintf ("Saving game to %s...\n", name);
f = fopen (name, "w");
if (!f)
{
Con_TPrintf (STL_ERRORCOULDNTOPEN);
Con_TPrintf ("ERROR: couldn't open %s.\n", filename);
return;
}
@ -214,11 +214,11 @@ void SV_Loadgame_f(void)
// been used. The menu calls it before stuffing loadgame command
// SCR_BeginLoadingPlaque ();
Con_TPrintf (STL_LOADGAMEFROM, filename);
Con_TPrintf ("Loading game from %s...\n", filename);
f = fopen (filename, "rb");
if (!f)
{
Con_TPrintf (STL_ERRORCOULDNTOPEN);
Con_TPrintf ("ERROR: couldn't open %s.\n", filename);
return;
}
@ -226,7 +226,7 @@ void SV_Loadgame_f(void)
if (version != SAVEGAME_VERSION && version != 5 && version != 6) //5 for NQ, 6 for ZQ/FQ
{
fclose (f);
Con_TPrintf (STL_BADSAVEVERSION, version, SAVEGAME_VERSION);
Con_TPrintf ("Savegame is version %i, not %i\n", version, SAVEGAME_VERSION);
return;
}
fscanf (f, "%s\n", str);
@ -352,7 +352,7 @@ void SV_Loadgame_f(void)
if (sv.state != ss_active)
{
fclose (f);
Con_TPrintf (STL_LOADFAILED);
Con_TPrintf ("Couldn't load map\n");
return;
}
@ -544,7 +544,7 @@ qboolean SV_LoadLevelCache(char *savename, char *level, char *startspot, qboolea
Q_snprintfz (name, sizeof(name), "saves/%s", level);
COM_DefaultExtension (name, ".lvc", sizeof(name));
// Con_TPrintf (STL_LOADGAMEFROM, name);
// Con_TPrintf ("Loading game from %s...\n", name);
#ifdef Q2SERVER
if (gametype == GT_QUAKE2)
@ -586,7 +586,7 @@ qboolean SV_LoadLevelCache(char *savename, char *level, char *startspot, qboolea
if (version != CACHEGAME_VERSION)
{
VFS_CLOSE (f);
Con_TPrintf (STL_BADSAVEVERSION, version, CACHEGAME_VERSION);
Con_TPrintf ("Savegame is version %i, not %i\n", version, CACHEGAME_VERSION);
return false;
}
VFS_GETS(f, str, sizeof(str)); //comment
@ -622,7 +622,7 @@ qboolean SV_LoadLevelCache(char *savename, char *level, char *startspot, qboolea
if (sv.state != ss_active)
{
VFS_CLOSE (f);
Con_TPrintf (STL_LOADFAILED);
Con_TPrintf ("Couldn't load map\n");
return false;
}
@ -839,7 +839,7 @@ void SV_SaveLevelCache(char *savedir, qboolean dontharmgame)
FS_CreatePath(name, FS_GAMEONLY);
if (!dontharmgame) //save game in progress
Con_TPrintf (STL_SAVEGAMETO, name);
Con_TPrintf ("Saving game to %s...\n", name);
#ifdef Q2SERVER
if (ge)
@ -865,7 +865,7 @@ void SV_SaveLevelCache(char *savedir, qboolean dontharmgame)
f = FS_OpenVFS (name, "wb", FS_GAME);
if (!f)
{
Con_TPrintf (STL_ERRORCOULDNTOPEN);
Con_TPrintf ("ERROR: couldn't open %s.\n", name);
return;
}
@ -1100,7 +1100,7 @@ void SV_Loadgame_f (void)
f = FS_OpenVFS (filename, "rb", FS_GAME);
if (!f)
{
Con_TPrintf (STL_ERRORCOULDNTOPEN);
Con_TPrintf ("ERROR: couldn't open %s.\n", filename);
return;
}
@ -1109,7 +1109,7 @@ void SV_Loadgame_f (void)
if (version < FTESAVEGAME_VERSION || version >= FTESAVEGAME_VERSION+GT_MAX)
{
VFS_CLOSE (f);
Con_TPrintf (STL_BADSAVEVERSION, version, FTESAVEGAME_VERSION);
Con_TPrintf ("Savegame is version %i, not %i\n", version, FTESAVEGAME_VERSION);
return;
}
gametype = version - FTESAVEGAME_VERSION;
@ -1117,7 +1117,7 @@ void SV_Loadgame_f (void)
#ifndef SERVERONLY
if (!cls.state)
#endif
Con_TPrintf (STL_LOADGAMEFROM, filename);
Con_TPrintf ("Loading game from %s...\n", filename);
for (clnum = 0; clnum < svs.allocated_client_slots; clnum++) //clear the server for the level change.

View file

@ -1043,6 +1043,7 @@ void SV_MulticastProtExt(vec3_t origin, multicast_t to, int dimension_mask, int
void SV_StartSound (int ent, vec3_t origin, int seenmask, int channel, char *sample, int volume, float attenuation, int pitchadj);
void SVQ1_StartSound (float *origin, wedict_t *entity, int channel, char *sample, int volume, float attenuation, int pitchadj);
void SV_PrintToClient(client_t *cl, int level, char *string);
void SV_TPrintToClient(client_t *cl, int level, const char *string);
void SV_StuffcmdToClient(client_t *cl, char *string);
void VARGS SV_ClientPrintf (client_t *cl, int level, char *fmt, ...) LIKEPRINTF(3);
void VARGS SV_ClientTPrintf (client_t *cl, int level, translation_t text, ...);

View file

@ -165,7 +165,7 @@ SV_Quit_f
void SV_Quit_f (void)
{
SV_FinalMessage ("server shutdown\n");
Con_TPrintf (STL_SHUTTINGDOWN);
Con_TPrintf ("Shutting down.\n");
SV_Shutdown ();
Sys_Quit ();
}
@ -182,7 +182,7 @@ void SV_Fraglogfile_f (void)
if (sv_fraglogfile)
{
Con_TPrintf (STL_FLOGGINGOFF);
Con_TPrintf ("Frag file logging off.\n");
VFS_CLOSE (sv_fraglogfile);
sv_fraglogfile = NULL;
return;
@ -204,12 +204,12 @@ void SV_Fraglogfile_f (void)
}
if (i==1000)
{
Con_TPrintf (STL_FLOGGINGFAILED);
Con_TPrintf ("Can't open any logfiles.\n");
sv_fraglogfile = NULL;
return;
}
Con_TPrintf (STL_FLOGGINGTO, name);
Con_TPrintf ("Logging frags to %s.\n", name);
}
@ -239,7 +239,7 @@ qboolean SV_SetPlayer (void)
return true;
}
}
Con_TPrintf (STL_USERIDNOTONSERVER, idnum);
Con_TPrintf ("Userid %i is not on the server\n", idnum);
return false;
}
@ -255,7 +255,7 @@ void SV_God_f (void)
{
if (!SV_MayCheat())
{
Con_TPrintf (STL_NEEDCHEATPARM);
Con_TPrintf ("You must run the server with +sv_cheats 1 to enable this command.\n");
return;
}
@ -265,9 +265,9 @@ void SV_God_f (void)
SV_LogPlayer(host_client, "god cheat");
sv_player->v->flags = (int)sv_player->v->flags ^ FL_GODMODE;
if ((int)sv_player->v->flags & FL_GODMODE)
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_GODON);
SV_ClientTPrintf (host_client, PRINT_HIGH, "godmode ON\n");
else
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_GODOFF);
SV_ClientTPrintf (host_client, PRINT_HIGH, "godmode OFF\n");
}
@ -275,7 +275,7 @@ void SV_Noclip_f (void)
{
if (!SV_MayCheat())
{
Con_TPrintf (STL_NEEDCHEATPARM);
Con_TPrintf ("You must run the server with +sv_cheats 1 to enable this command.\n");
return;
}
@ -286,12 +286,12 @@ void SV_Noclip_f (void)
if (sv_player->v->movetype != MOVETYPE_NOCLIP)
{
sv_player->v->movetype = MOVETYPE_NOCLIP;
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_NOCLIPON);
SV_ClientTPrintf (host_client, PRINT_HIGH, "noclip ON\n");
}
else
{
sv_player->v->movetype = MOVETYPE_WALK;
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_NOCLIPOFF);
SV_ClientTPrintf (host_client, PRINT_HIGH, "noclip OFF\n");
}
}
@ -311,7 +311,7 @@ void SV_Give_f (void)
if (!SV_MayCheat())
{
Con_TPrintf (STL_NEEDCHEATPARM);
Con_TPrintf ("You must run the server with +sv_cheats 1 to enable this command.\n");
return;
}
@ -368,7 +368,7 @@ void SV_Give_f (void)
oldself = pr_global_struct->self;
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, sv_player);
Cmd_ShiftArgs(1, false);
Con_Printf("Result: %s\n", svprogfuncs->EvaluateDebugString(svprogfuncs, Cmd_Args()));
Con_TPrintf("Result: %s\n", svprogfuncs->EvaluateDebugString(svprogfuncs, Cmd_Args()));
pr_global_struct->self = oldself;
}
}
@ -439,7 +439,7 @@ void SV_Map_f (void)
if (Cmd_Argc() != 2 && Cmd_Argc() != 3)
{
Con_TPrintf (STL_MAPCOMMANDUSAGE);
Con_TPrintf ("map <levelname> : continue game on a new level\n");
return;
}
@ -554,7 +554,7 @@ void SV_Map_f (void)
{
// FTE is still a Quake engine so report BSP missing
snprintf (expanded, sizeof(expanded), exts[0], level);
Con_TPrintf (STL_CANTFINDMAP, expanded);
Con_TPrintf ("Can't find %s\n", expanded);
#ifndef SERVERONLY
SCR_SetLoadingStage(LS_NONE);
#endif
@ -716,17 +716,17 @@ void SV_Kick_f (void)
while((cl = SV_GetClientForString(Cmd_Argv(1), &clnum)))
{
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTWASKICKED, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s was kicked\n", cl->name);
// print directly, because the dropped client won't get the
// SV_BroadcastPrintf message
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUWEREKICKED);
SV_ClientTPrintf (cl, PRINT_HIGH, "You were kicked\n");
SV_LogPlayer(cl, "kicked");
SV_DropClient (cl);
}
if (clnum == -1)
Con_TPrintf (STL_USERDOESNTEXIST, Cmd_Argv(1));
Con_TPrintf ("Couldn't find user number %s\n", Cmd_Argv(1));
}
/*for q3's kick bot menu*/
@ -742,10 +742,10 @@ void SV_KickSlot_f (void)
{
cl = &svs.clients[clnum];
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTWASKICKED, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s was kicked\n", cl->name);
// print directly, because the dropped client won't get the
// SV_BroadcastPrintf message
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUWEREKICKED);
SV_ClientTPrintf (cl, PRINT_HIGH, "You were kicked\n");
SV_LogPlayer(cl, "kicked");
SV_DropClient (cl);
@ -794,16 +794,16 @@ void SV_BanName_f (void)
if (reasonsize)
Q_strcpy(nb->reason, reason);
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTWASBANNED, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s was banned\n", cl->name);
// print directly, because the dropped client won't get the
// SV_BroadcastPrintf message
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUWEREBANNED);
SV_ClientTPrintf (cl, PRINT_HIGH, "You were banned\n");
SV_LogPlayer(cl, "banned name");
SV_DropClient (cl);
}
if (clnum == -1)
Con_TPrintf (STL_USERDOESNTEXIST, Cmd_Argv(1));
Con_TPrintf ("Couldn't find user number %s\n", Cmd_Argv(1));
}
void SV_KickBanIP(netadr_t *banadr, netadr_t *banmask, char *reason)
@ -836,10 +836,10 @@ void SV_KickBanIP(netadr_t *banadr, netadr_t *banmask, char *reason)
if (shouldkick)
{
// match, so kick
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTWASBANNED, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s was banned\n", cl->name);
// print directly, because the dropped client won't get the
// SV_BroadcastPrintf message
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUWEREBANNED);
SV_ClientTPrintf (cl, PRINT_HIGH, "You were banned\n");
SV_LogPlayer(cl, "banned ip");
SV_DropClient (cl);
}
@ -1150,7 +1150,7 @@ void SV_ForceName_f (void)
}
if (clnum == -1)
Con_TPrintf (STL_USERDOESNTEXIST, Cmd_Argv(1));
Con_TPrintf ("Couldn't find user number %s\n", Cmd_Argv(1));
}
void SV_CripplePlayer_f (void)
@ -1168,24 +1168,24 @@ void SV_CripplePlayer_f (void)
if (persist && cl->rankid)
{
cl->iscrippled = 2;
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTISCRIPPLEDPERMANENTLY, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s is now crippled permanently\n", cl->name);
}
else
{
cl->iscrippled = true;
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTISCRIPPLED, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s is crippled\n", cl->name);
}
}
else
{
SV_LogPlayer(cl, "uncrippled");
cl->iscrippled = false;
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUARNTCRIPPLED);
SV_ClientTPrintf (cl, PRINT_HIGH, "You are no longer crippled\n");
}
}
if (clnum == -1)
Con_TPrintf (STL_USERDOESNTEXIST, Cmd_Argv(1));
Con_TPrintf ("Couldn't find user number %s\n", Cmd_Argv(1));
}
void SV_Mute_f (void)
@ -1203,24 +1203,24 @@ void SV_Mute_f (void)
if (persist && cl->rankid)
{
cl->ismuted = 2;
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTISMUTEDPERMANENTLY, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s was muted permanently\n", cl->name);
}
else
{
cl->ismuted = true;
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTISMUTED, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s was muted\n", cl->name);
}
}
else
{
SV_LogPlayer(cl, "unmuted");
cl->ismuted = false;
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUARNTMUTED);
SV_ClientTPrintf (cl, PRINT_HIGH, "You are no longer muted\n");
}
}
if (clnum == -1)
Con_TPrintf (STL_USERDOESNTEXIST, Cmd_Argv(1));
Con_TPrintf ("Couldn't find user number %s\n", Cmd_Argv(1));
}
void SV_Cuff_f (void)
@ -1238,24 +1238,24 @@ void SV_Cuff_f (void)
if (persist && cl->rankid)
{
cl->iscuffed = 2;
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTISCUFFEDPERMANENTLY, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s is still cuffed\n", cl->name);
}
else
{
cl->iscuffed = true;
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTISCUFFED, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s is cuffed\n", cl->name);
}
}
else
{
SV_LogPlayer(cl, "uncuffed");
cl->iscuffed = false;
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUARNTCUFFED);
SV_ClientTPrintf (cl, PRINT_HIGH, "You are no longer cuffed\n");
}
}
if (clnum == -1)
Con_TPrintf (STL_USERDOESNTEXIST, Cmd_Argv(1));
Con_TPrintf ("Couldn't find user number %s\n", Cmd_Argv(1));
}
void SV_Floodprot_f(void)
@ -1657,7 +1657,7 @@ void SV_ConSayOne_f (void)
SV_ClientPrintf(to, PRINT_CHAT, "%s", text);
}
if (!clnum)
Con_TPrintf(STL_USERDOESNTEXIST, Cmd_Argv(1));
Con_TPrintf("Couldn't find user number %s\n", Cmd_Argv(1));
}
/*
@ -1729,14 +1729,14 @@ void SV_Serverinfo_f (void)
if (Cmd_Argc() == 1)
{
Con_TPrintf (STL_SERVERINFOSETTINGS);
Con_TPrintf ("Server info settings:\n");
Info_Print (svs.info, "");
return;
}
if (Cmd_Argc() < 3)
{
Con_TPrintf (STL_SERVERINFOSYNTAX);
Con_TPrintf ("usage: serverinfo [ <key> <value> ]\n");
return;
}
@ -1801,14 +1801,14 @@ void SV_Localinfo_f (void)
if (Cmd_Argc() == 1)
{
Con_TPrintf (STL_LOCALINFOSETTINGS);
Con_TPrintf ("Local info settings:\n");
Info_Print (localinfo, "");
return;
}
if (Cmd_Argc() != 3)
{
Con_TPrintf (STL_LOCALINFOSYNTAX);
Con_TPrintf ("usage: localinfo [ <key> <value> ]\n");
return;
}
@ -1875,7 +1875,7 @@ void SV_User_f (void)
if (Cmd_Argc() != 2)
{
Con_TPrintf (STL_USERINFOSYNTAX);
Con_TPrintf ("Usage: info <userid>\n");
return;
}
@ -1954,7 +1954,7 @@ void SV_User_f (void)
}
if (clnum == -1)
Con_TPrintf (STL_USERIDNOTONSERVER, atoi(Cmd_Argv(1)));
Con_TPrintf ("Userid %i is not on the server\n", atoi(Cmd_Argv(1)));
}
/*
@ -1978,13 +1978,13 @@ void SV_Gamedir (void)
if (Cmd_Argc() == 1)
{
Con_TPrintf (STL_CURRENTGAMEDIR, Info_ValueForKey (svs.info, "*gamedir"));
Con_TPrintf ("Current gamedir: %s\n", Info_ValueForKey (svs.info, "*gamedir"));
return;
}
if (Cmd_Argc() != 2)
{
Con_TPrintf (STL_SVGAMEDIRUSAGE);
Con_TPrintf ("Usage: sv_gamedir <newgamedir>\n");
return;
}
@ -1993,7 +1993,7 @@ void SV_Gamedir (void)
if (strstr(dir, "..") || strstr(dir, "/")
|| strstr(dir, "\\") || strstr(dir, ":") )
{
Con_TPrintf (STL_GAMEDIRCANTBEPATH);
Con_TPrintf ("%s should be a single filename, not a path\n", Cmd_Argv(0));
return;
}
@ -2013,13 +2013,13 @@ void SV_Gamedir_f (void)
if (Cmd_Argc() == 1)
{
Con_TPrintf (STL_CURRENTGAMEDIR, FS_GetGamedir());
Con_TPrintf ("Current gamedir: %s\n", FS_GetGamedir());
return;
}
if (Cmd_Argc() != 2)
{
Con_TPrintf (STL_GAMEDIRUSAGE);
Con_TPrintf ("Usage: gamedir <newgamedir>\n");
return;
}
@ -2028,7 +2028,7 @@ void SV_Gamedir_f (void)
if (strstr(dir, "..") || strstr(dir, "/")
|| strstr(dir, "\\") || strstr(dir, ":") )
{
Con_TPrintf (STL_GAMEDIRCANTBEPATH);
Con_TPrintf ("%s should be a single filename, not a path\n", Cmd_Argv(0));
return;
}
@ -2061,7 +2061,7 @@ void SV_Snap (int uid)
}
if (i >= MAX_CLIENTS)
{
Con_TPrintf (STL_USERDOESNTEXIST);
Con_TPrintf ("Couldn't find user number %i\n", uid);
return;
}
if (!ISQWCLIENT(cl))
@ -2086,7 +2086,7 @@ void SV_Snap (int uid)
}
if (i==100)
{
Con_TPrintf (STL_SNAPTOOMANYFILES);
Con_TPrintf ("Snap: Couldn't create a file, clean some out.\n");
return;
}
strcpy(cl->uploadfn, checkname);
@ -2099,7 +2099,7 @@ void SV_Snap (int uid)
ClientReliableWrite_Begin (cl, svc_stufftext, 24);
ClientReliableWrite_String (cl, "cmd snap\n");
Con_TPrintf (STL_SNAPREQUEST, uid);
Con_TPrintf ("Requesting snap from user %d...\n", uid);
}
/*
@ -2113,7 +2113,7 @@ void SV_Snap_f (void)
if (Cmd_Argc() != 2)
{
Con_TPrintf (STL_SNAPUSAGE);
Con_TPrintf ("Usage: snap <userid>\n");
return;
}

View file

@ -428,7 +428,7 @@ void SV_CalcPHS (void)
}
}
if (developer.value)
Con_TPrintf (STL_BUILDINGPHS);
Con_TPrintf ("Building PHS...\n");
sv.phs = ZG_Malloc (&sv.world.worldmodel->memgroup, rowbytes*num);
@ -500,7 +500,7 @@ void SV_CalcPHS (void)
if (num)
if (developer.value)
Con_TPrintf (STL_PHSINFO, vcount/num, count/num, num);
Con_TPrintf ("Average leafs visible / hearable / total: %i / %i / %i\n", vcount/num, count/num, num);
}
unsigned SV_CheckModel(char *mdl)
@ -525,7 +525,7 @@ void SV_UnspawnServer (void) //terminate the running server.
int i;
if (sv.state)
{
Con_TPrintf(STL_SERVERUNSPAWNED);
Con_TPrintf("Server ended\n");
SV_FinalMessage("Server unspawned\n");
if (sv.mvdrecording)
@ -1456,7 +1456,7 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
Info_SetValueForKey (svs.info, "map", sv.name, MAX_SERVERINFO_STRING);
if (sv.allocated_client_slots != 1)
Con_TPrintf (STL_SERVERSPAWNED); //misc filenotfounds can be misleading.
Con_TPrintf ("Server spawned.\n"); //misc filenotfounds can be misleading.
if (!startspot)
{

View file

@ -560,9 +560,9 @@ void SV_DropClient (client_t *drop)
if (!drop->redirect && drop->state > cs_zombie)
{
if (drop->spectator)
Con_Printf ("Spectator \"%s\" removed\n",drop->name);
Con_TPrintf ("Spectator \"%s\" removed\n",drop->name);
else
Con_Printf ("Client \"%s\" removed\n",drop->name);
Con_TPrintf ("Client \"%s\" removed\n",drop->name);
}
if (drop->download)
@ -743,7 +743,7 @@ void PIN_SaveMessages(void)
f = FS_OpenVFS("pinned.txt", "wb", FS_GAMEONLY);
if (!f)
{
Con_Printf("couldn't write to %s\n", "pinned.txt");
Con_TPrintf("couldn't write to %s\n", "pinned.txt");
return;
}
@ -1041,7 +1041,7 @@ void SVC_Status (void)
displayflags = STATUS_SERVERINFO|STATUS_PLAYERS;
Cmd_TokenizeString ("status", false, false);
SV_BeginRedirect (RD_PACKET, LANGDEFAULT);
SV_BeginRedirect (RD_PACKET, TL_FindLanguage(""));
if (displayflags&STATUS_SERVERINFO)
Con_Printf ("%s\n", svs.info);
for (i=0 ; i<MAX_CLIENTS ; i++)
@ -1256,7 +1256,7 @@ void SV_CheckLog (void)
svs.logsequence++;
sz = &svs.log[svs.logsequence&1];
sz->cursize = 0;
Con_Printf ("beginning fraglog sequence %i\n", svs.logsequence);
Con_TPrintf ("beginning fraglog sequence %i\n", svs.logsequence);
}
}
@ -1542,7 +1542,7 @@ void VARGS SV_OutOfBandTPrintf (int q2, netadr_t *adr, int language, translation
{
va_list argptr;
char string[8192];
char *format = langtext(text, language);
const char *format = langtext(text, language);
va_start (argptr, text);
if (q2)
@ -1903,7 +1903,7 @@ client_t *SVC_DirectConnect(void)
// break;
default:
SV_RejectMessage (SCP_BAD, "Server is %s.\n", version_string());
Con_Printf ("* rejected connect from incompatable client\n");
Con_TPrintf ("* rejected connect from incompatable client\n");
return NULL;
}
@ -1926,7 +1926,7 @@ client_t *SVC_DirectConnect(void)
if (strcmp(Info_ValueForKey(userinfo[0], "protocol"), "darkplaces 3"))
{
SV_RejectMessage (SCP_BAD, "Server is %s.\n", version_string());
Con_Printf ("* rejected connect from incompatible client\n");
Con_TPrintf ("* rejected connect from incompatible client\n");
return NULL;
}
//it's a darkplaces client.
@ -1937,7 +1937,7 @@ client_t *SVC_DirectConnect(void)
//reason: dp is too similar for concerns about unsupported code, while the main reason why we disable nq is because of the lack of challenges
//(and no, this isn't a way to bypass invalid challenges)
protocol = SCP_NETQUAKE;
Con_Printf ("* DP without sv_bigcoords 1\n");
Con_TPrintf ("* DP without sv_bigcoords 1\n");
}
else if (strstr(s, "DP7"))
protocol = SCP_DARKPLACES7;
@ -1968,7 +1968,7 @@ client_t *SVC_DirectConnect(void)
if (numssclients<1 || numssclients > MAX_SPLITS)
{
SV_RejectMessage (SCP_BAD, "Server is %s.\n", version_string());
Con_Printf ("* rejected connect from broken client\n");
Con_TPrintf ("* rejected connect from broken client\n");
return NULL;
}
}
@ -1991,7 +1991,7 @@ client_t *SVC_DirectConnect(void)
else if (version != PROTOCOL_VERSION_QW)
{
SV_RejectMessage (SCP_BAD, "Server is protocol version %i, received %i\n", PROTOCOL_VERSION_QW, version);
Con_Printf ("* rejected connect from version %i\n", version);
Con_TPrintf ("* rejected connect from version %i\n", version);
return NULL;
}
else
@ -2017,7 +2017,7 @@ client_t *SVC_DirectConnect(void)
if (!sv_listen_qw.value && net_from.type != NA_LOOPBACK)
{
SV_RejectMessage (protocol, "QuakeWorld protocols are not permitted on this server.\n");
Con_Printf ("* rejected connect from quakeworld\n");
Con_TPrintf ("* rejected connect from quakeworld\n");
return NULL;
}
}
@ -2028,19 +2028,19 @@ client_t *SVC_DirectConnect(void)
if (*Info_ValueForKey(userinfo[0], "*qwfwd"))
{
SV_RejectMessage (protocol, "Proxies are not permitted on this server.\n");
Con_Printf ("* rejected connect from qwfwd proxy\n");
Con_TPrintf ("* rejected connect from qwfwd proxy\n");
return NULL;
}
if (*Info_ValueForKey(userinfo[0], "Qizmo"))
{
SV_RejectMessage (protocol, "Proxies are not permitted on this server.\n");
Con_Printf ("* rejected connect from qizmo proxy\n");
Con_TPrintf ("* rejected connect from qizmo proxy\n");
return NULL;
}
if (*Info_ValueForKey(userinfo[0], "*qtv"))
{
SV_RejectMessage (protocol, "Proxies are not permitted on this server.\n");
Con_Printf ("* rejected connect from qtv proxy (udp)\n");
Con_TPrintf ("* rejected connect from qtv proxy (udp)\n");
return NULL;
}
}
@ -2111,7 +2111,7 @@ client_t *SVC_DirectConnect(void)
stricmp(spectator_password.string, "none") &&
strcmp(spectator_password.string, s) )
{ // failed
Con_Printf ("%s:spectator password failed\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &net_from));
Con_TPrintf ("%s:spectator password failed\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &net_from));
SV_RejectMessage (protocol, "requires a spectator password\n\n");
return NULL;
}
@ -2126,7 +2126,7 @@ client_t *SVC_DirectConnect(void)
stricmp(password.string, "none") &&
strcmp(password.string, s) )
{
Con_Printf ("%s:password failed\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &net_from));
Con_TPrintf ("%s:password failed\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &net_from));
SV_RejectMessage (protocol, "server requires a password\n\n");
return NULL;
}
@ -2207,9 +2207,9 @@ client_t *SVC_DirectConnect(void)
if (cl->state == cs_connected)
{
if (cl->protocol != protocol)
Con_Printf("%s: diff prot connect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
Con_TPrintf("%s: diff prot connect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
else
Con_Printf("%s:dup connect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
Con_TPrintf("%s:dup connect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
cl->protocol = SCP_BAD; //make sure the netchan doesn't try sending anything.
SV_DropClient(cl);
@ -2229,7 +2229,7 @@ client_t *SVC_DirectConnect(void)
}*/
else
{
Con_Printf ("%s:reconnect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
Con_TPrintf ("%s:reconnect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
// SV_DropClient (cl);
}
break;
@ -2356,14 +2356,14 @@ client_t *SVC_DirectConnect(void)
if (!svprogfuncs)
{
SV_RejectMessage (protocol, "\nserver is full\n\n");
Con_Printf ("%s:full connect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
Con_TPrintf ("%s:full connect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
}
else
{
if (spectator && spectators >= maxspectators.ival)
{
SV_RejectMessage (protocol, "\nserver is full (%i of %i spectators)\n\n", spectators, maxspectators.ival);
Con_Printf ("%s:full connect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
Con_TPrintf ("%s:full connect\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
}
else if (!spectator && clients >= maxclients.ival)
SV_RejectMessage (protocol, "\nserver is full (%i of %i players)\n\n", clients, maxclients.ival);
@ -2473,7 +2473,7 @@ client_t *SVC_DirectConnect(void)
if (pext_ezquake_nochunks.ival)
{
newcl->fteprotocolextensions &= ~PEXT_CHUNKEDDOWNLOADS;
Con_Printf("%s: ignoring ezquake chunked downloads extension.\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
Con_TPrintf("%s: ignoring ezquake chunked downloads extension.\n", NET_AdrToString (adrbuf, sizeof(adrbuf), &adr));
}
}
@ -2555,7 +2555,7 @@ client_t *SVC_DirectConnect(void)
if (!Rank_GetPlayerStats(newcl->rankid, &rs))
{
SV_RejectMessage (protocol, "Rankings/Account system failed\n");
Con_Printf("banned player %s is trying to connect\n", newcl->name);
Con_TPrintf("banned player %s is trying to connect\n", newcl->name);
newcl->name[0] = 0;
memset (newcl->userinfo, 0, sizeof(newcl->userinfo));
newcl->state = cs_free;
@ -2564,15 +2564,15 @@ client_t *SVC_DirectConnect(void)
if (rs.flags1 & RANK_MUTED)
{
SV_BroadcastTPrintf(PRINT_MEDIUM, STL_CLIENTISSTILLMUTED, newcl->name);
SV_BroadcastTPrintf(PRINT_MEDIUM, "%s is muted (still)\n", newcl->name);
}
if (rs.flags1 & RANK_CUFFED)
{
SV_BroadcastTPrintf(PRINT_LOW, STL_CLIENTISSTILLCUFFED, newcl->name);
SV_BroadcastTPrintf(PRINT_LOW, "%s is now cuffed permanently\n", newcl->name);
}
if (rs.flags1 & RANK_CRIPPLED)
{
SV_BroadcastTPrintf(PRINT_HIGH, STL_CLIENTISSTILLCRIPPLED, newcl->name);
SV_BroadcastTPrintf(PRINT_HIGH, "%s is still crippled\n", newcl->name);
}
if (rs.timeonserver)
@ -2597,9 +2597,9 @@ client_t *SVC_DirectConnect(void)
}
if (rs.timeonserver > 3*60) //woo. Ages.
s = va(langtext(STL_BIGGREETING, newcl->language), newcl->name, (int)(rs.timeonserver/(60*60)), (int)((int)(rs.timeonserver/60)%(60)));
s = va(langtext("Welcome back %s. You have previously spent %i:%i hours connected\n", newcl->language), newcl->name, (int)(rs.timeonserver/(60*60)), (int)((int)(rs.timeonserver/60)%(60)));
else //measure this guy in minuites.
s = va(langtext(STL_SHORTGREETING, newcl->language), newcl->name, (int)(rs.timeonserver/60));
s = va(langtext("Welcome back %s. You have previously spent %i mins connected\n", newcl->language), newcl->name, (int)(rs.timeonserver/60));
SV_OutOfBandPrintf (protocol == SCP_QUAKE2, &adr, s);
}
@ -2607,7 +2607,7 @@ client_t *SVC_DirectConnect(void)
{
SV_GetNewSpawnParms(newcl);
SV_OutOfBandTPrintf (protocol == SCP_QUAKE2, &adr, newcl->language, STL_FIRSTGREETING, newcl->name, (int)rs.timeonserver);
SV_OutOfBandTPrintf (protocol == SCP_QUAKE2, &adr, newcl->language, "Welcome %s. Your time on this server is being logged and ranked\n", newcl->name, (int)rs.timeonserver);
}
//else loaded players already have their initial parms set
}
@ -2635,12 +2635,12 @@ client_t *SVC_DirectConnect(void)
}
else if (newcl->spectator)
{
SV_BroadcastTPrintf(PRINT_LOW, STL_SPECTATORCONNECTED, newcl->name);
SV_BroadcastTPrintf(PRINT_LOW, "spectator %s connected\n", newcl->name);
// Con_Printf ("Spectator %s connected\n", newcl->name);
}
else
{
SV_BroadcastTPrintf(PRINT_LOW, STL_CLIENTCONNECTED, newcl->name);
SV_BroadcastTPrintf(PRINT_LOW, "client %s connected\n", newcl->name);
// Con_DPrintf ("Client %s connected\n", newcl->name);
}
}
@ -2648,12 +2648,12 @@ client_t *SVC_DirectConnect(void)
{
if (newcl->spectator)
{
SV_BroadcastTPrintf(PRINT_LOW, STL_RECORDEDSPECTATORCONNECTED, newcl->name);
SV_BroadcastTPrintf(PRINT_LOW, "recorded spectator %s connected\n", newcl->name);
// Con_Printf ("Recorded spectator %s connected\n", newcl->name);
}
else
{
SV_BroadcastTPrintf(PRINT_LOW, STL_RECORDEDCLIENTCONNECTED, newcl->name);
SV_BroadcastTPrintf(PRINT_LOW, "recorded client %s connected\n", newcl->name);
// Con_DPrintf ("Recorded client %s connected\n", newcl->name);
}
}
@ -2789,7 +2789,7 @@ void SVC_RemoteCommand (void)
char *br = SV_BannedReason(&net_from);
if (br)
{
Con_Printf ("Rcon from banned ip %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
Con_TPrintf ("Rcon from banned ip %s: %s\n", NET_AdrToString (adr, sizeof(adr), &net_from), br);
return;
}
}
@ -2823,10 +2823,10 @@ void SVC_RemoteCommand (void)
return;
Con_Printf ("Rcon from %s:\n%s\n"
Con_TPrintf ("Rcon from %s:\n%s\n"
, NET_AdrToString (adr, sizeof(adr), &net_from), net_message.data+4);
SV_BeginRedirect (RD_PACKET, LANGDEFAULT);
SV_BeginRedirect (RD_PACKET, svs.language);
remaining[0] = 0;
@ -2834,9 +2834,9 @@ void SVC_RemoteCommand (void)
{
if (strlen(remaining)+strlen(Cmd_Argv(i))>=sizeof(remaining)-2)
{
Con_Printf("Rcon was too long\n");
Con_TPrintf("Rcon was too long\n");
SV_EndRedirect ();
Con_Printf ("Rcon from %s:\n%s\n"
Con_TPrintf ("Rcon from %s:\n%s\n"
, NET_AdrToString (adr, sizeof(adr), &net_from), "Was too long - possible buffer overflow attempt");
return;
}
@ -2853,21 +2853,21 @@ void SVC_RemoteCommand (void)
}
#endif
Con_Printf ("Bad rcon from %s:\n%s\n"
Con_TPrintf ("Bad rcon from %s:\n%s\n"
, NET_AdrToString (adr, sizeof(adr), &net_from), net_message.data+4);
SV_BeginRedirect (RD_PACKET, LANGDEFAULT);
SV_BeginRedirect (RD_PACKET, svs.language);
Con_Printf ("Bad rcon_password.\n");
Con_TPrintf ("Bad rcon_password.\n");
}
else
{
Con_Printf ("Rcon from %s:\n%s\n"
Con_TPrintf ("Rcon from %s:\n%s\n"
, NET_AdrToString (adr, sizeof(adr), &net_from), net_message.data+4);
SV_BeginRedirect (RD_PACKET, LANGDEFAULT);
SV_BeginRedirect (RD_PACKET, svs.language);
remaining[0] = 0;
@ -2875,9 +2875,9 @@ void SVC_RemoteCommand (void)
{
if (strlen(remaining)+strlen(Cmd_Argv(i))>=sizeof(remaining)-2)
{
Con_Printf("Rcon was too long\n");
Con_TPrintf("Rcon was too long\n");
SV_EndRedirect ();
Con_Printf ("Rcon from %s:\n%s\n"
Con_TPrintf ("Rcon from %s:\n%s\n"
, NET_AdrToString (adr, sizeof(adr), &net_from), "Was too long - possible buffer overflow attempt");
return;
}
@ -2920,19 +2920,19 @@ void SVC_RealIP (void)
if (NET_AddressSmellsFunny(&net_from))
{
Con_Printf("funny realip address: %s, ", NET_AdrToString(adr, sizeof(adr), &net_from));
Con_Printf("proxy address: %s\n", NET_AdrToString(adr, sizeof(adr), &svs.clients[slotnum].netchan.remote_address));
Con_TPrintf("funny realip address: %s, ", NET_AdrToString(adr, sizeof(adr), &net_from));
Con_TPrintf("proxy address: %s\n", NET_AdrToString(adr, sizeof(adr), &svs.clients[slotnum].netchan.remote_address));
return;
}
banreason = SV_BannedReason(&net_from);
if (banreason)
{
Con_Printf("%s has a banned realip\n", svs.clients[slotnum].name);
Con_TPrintf("%s has a banned realip\n", svs.clients[slotnum].name);
if (*banreason)
SV_ClientPrintf(&svs.clients[slotnum], PRINT_CHAT, "You were banned.\nReason: %s\n", banreason);
SV_ClientTPrintf(&svs.clients[slotnum], PRINT_CHAT, "You were banned.\nReason: %s\n", banreason);
else
SV_ClientPrintf(&svs.clients[slotnum], PRINT_CHAT, "You were banned.\n");
SV_ClientTPrintf(&svs.clients[slotnum], PRINT_CHAT, "You were banned.\n");
SV_DropClient(&svs.clients[slotnum]);
return;
}
@ -2967,7 +2967,7 @@ void SVC_ACK (void)
}
}
}
Con_Printf ("A2A_ACK from %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
Con_TPrintf ("A2A_ACK from %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
}
//returns false to block replies
@ -3011,7 +3011,7 @@ qboolean SV_ConnectionlessPacket (void)
if (net_message.cursize >= MAX_QWMSGLEN) //add a null term in message space
{
Con_Printf("Oversized packet from %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
Con_TPrintf("Oversized packet from %s\n", NET_AdrToString (adr, sizeof(adr), &net_from));
net_message.cursize=MAX_QWMSGLEN-1;
}
net_message.data[net_message.cursize] = '\0'; //terminate it properly. Just in case.
@ -3069,7 +3069,7 @@ qboolean SV_ConnectionlessPacket (void)
#endif
if (secure.value) //FIXME: possible problem for nq clients when enabled
{
Netchan_OutOfBandPrint (NS_SERVER, &net_from, "%c\nThis server requires client validation.\nPlease use the "DISTRIBUTION" validation program\n", A2C_PRINT);
Netchan_OutOfBandTPrintf (NS_SERVER, &net_from, svs.language, "%c\nThis server requires client validation.\nPlease use the "DISTRIBUTION" validation program\n", A2C_PRINT);
}
else
{
@ -3108,7 +3108,7 @@ qboolean SV_ConnectionlessPacket (void)
unsigned int ct = Sys_Milliseconds();
if (ct - lt > 5*1000)
{
Con_Printf ("bad connectionless packet from %s: \"%s\"\n", NET_AdrToString (adr, sizeof(adr), &net_from), c);
Con_TPrintf ("bad connectionless packet from %s: \"%s\"\n", NET_AdrToString (adr, sizeof(adr), &net_from), c);
lt = ct;
}
}
@ -3584,9 +3584,9 @@ qboolean SV_ReadPackets (float *delay)
if (banreason)
{
if (*banreason)
Netchan_OutOfBandPrint(NS_SERVER, &net_from, "%cYou are banned: %s\n", A2C_PRINT, banreason);
Netchan_OutOfBandTPrintf(NS_SERVER, &net_from, svs.language, "%cYou are banned: %s\n", A2C_PRINT, banreason);
else
Netchan_OutOfBandPrint(NS_SERVER, &net_from, "%cYou are banned\n", A2C_PRINT);
Netchan_OutOfBandTPrintf(NS_SERVER, &net_from, svs.language, "%cYou are banned\n", A2C_PRINT);
continue;
}
@ -3756,8 +3756,9 @@ void SV_CheckTimeouts (void)
if (cl->state == cs_connected || cl->state == cs_spawned) {
if (!cl->spectator)
nclients++;
if (cl->netchan.last_received < droptime && cl->netchan.remote_address.type != NA_LOOPBACK && cl->protocol != SCP_BAD) {
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTTIMEDOUT, cl->name);
if (cl->netchan.last_received < droptime && cl->netchan.remote_address.type != NA_LOOPBACK && cl->protocol != SCP_BAD)
{
SV_BroadcastTPrintf (PRINT_HIGH, "Client %s timed out\n", cl->name);
SV_DropClient (cl);
cl->state = cs_free; // don't bother with zombie state for local player.
}
@ -3778,7 +3779,7 @@ void SV_CheckTimeouts (void)
cl->istobeloaded=false;
SV_BroadcastTPrintf (PRINT_HIGH, STL_LOADZOMIBETIMEDOUT, cl->name);
SV_BroadcastTPrintf (PRINT_HIGH, "LoadZombie %s timed out\n", cl->name);
// cl->state = cs_zombie; // the real zombieness starts now
// cl->connection_started = realtime;
}
@ -3788,7 +3789,7 @@ void SV_CheckTimeouts (void)
{
// nobody left, unpause the server
if (SV_TogglePause(NULL))
SV_BroadcastTPrintf(PRINT_HIGH, STL_CLIENTLESSUNPAUSE);
SV_BroadcastTPrintf(PRINT_HIGH, "pause released due to empty server\n");
}
}
@ -4125,7 +4126,7 @@ void SV_MVDStream_Poll(void);
if (sv.multicast.cursize)
{
Con_Printf("Unterminated multicast\n");
Con_TPrintf("Unterminated multicast\n");
sv.multicast.cursize=0;
}
@ -4170,7 +4171,7 @@ void SV_MVDStream_Poll(void);
if (sv.multicast.cursize)
{
Con_Printf("Unterminated multicast\n");
Con_TPrintf("Unterminated multicast\n");
sv.multicast.cursize=0;
}
@ -4474,7 +4475,7 @@ void Master_Heartbeat (void)
else if (!NET_StringToAdr(sv_masterlist[i].cv.string, 0, &sv_masterlist[i].adr))
{
sv_masterlist[i].adr.port = 0;
Con_Printf ("Couldn't resolve master \"%s\"\n", sv_masterlist[i].cv.string);
Con_TPrintf ("Couldn't resolve master \"%s\"\n", sv_masterlist[i].cv.string);
}
else
{
@ -4527,7 +4528,7 @@ void Master_Heartbeat (void)
}
if (sv_reportheartbeats.value)
Con_Printf ("Sending heartbeat to %s (%s)\n", NET_AdrToString (adr, sizeof(adr), &sv_masterlist[i].adr), sv_masterlist[i].cv.string);
Con_TPrintf ("Sending heartbeat to %s (%s)\n", NET_AdrToString (adr, sizeof(adr), &sv_masterlist[i].adr), sv_masterlist[i].cv.string);
NET_SendPacket (NS_SERVER, strlen(string), string, &sv_masterlist[i].adr);
}
@ -4536,7 +4537,7 @@ void Master_Heartbeat (void)
if (sv_listen_dp.value || sv_listen_nq.value) //set listen to 1 to allow qw connections, 2 to allow nq connections too.
{
if (sv_reportheartbeats.value)
Con_Printf ("Sending heartbeat to %s (%s)\n", NET_AdrToString (adr, sizeof(adr), &sv_masterlist[i].adr), sv_masterlist[i].cv.string);
Con_TPrintf ("Sending heartbeat to %s (%s)\n", NET_AdrToString (adr, sizeof(adr), &sv_masterlist[i].adr), sv_masterlist[i].cv.string);
{
char *str = "\377\377\377\377heartbeat DarkPlaces\x0A";
@ -4618,7 +4619,7 @@ void Master_Shutdown (void)
{
case MP_QUAKEWORLD:
if (sv_reportheartbeats.value)
Con_Printf ("Sending shutdown to %s\n", NET_AdrToString (adr, sizeof(adr), &sv_masterlist[i].adr));
Con_TPrintf ("Sending shutdown to %s\n", NET_AdrToString (adr, sizeof(adr), &sv_masterlist[i].adr));
NET_SendPacket (NS_SERVER, strlen(string), string, &sv_masterlist[i].adr);
break;
@ -4820,7 +4821,7 @@ void SV_ExtractFromUserinfo (client_t *cl, qboolean verbose)
if (strncmp(newname, cl->name, sizeof(cl->namebuf)-1))
{
if (cl->ismuted && *cl->name && verbose) //!verbose is a gamecode-forced update, where the gamecode is expected to know what its doing.
SV_ClientTPrintf (cl, PRINT_HIGH, STL_NONAMEASMUTE);
SV_ClientTPrintf (cl, PRINT_HIGH, "Muted players may not change their names\n");
else
{
@ -4834,8 +4835,8 @@ void SV_ExtractFromUserinfo (client_t *cl, qboolean verbose)
}
else if (cl->lastnamecount++ > 4 && verbose)
{
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTKICKEDNAMESPAM, cl->name);
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUWEREKICKEDNAMESPAM);
SV_BroadcastTPrintf (PRINT_HIGH, "%s was kicked for name spamming\n", cl->name);
SV_ClientTPrintf (cl, PRINT_HIGH, "You were kicked for name spamming\n");
SV_DropClient (cl);
return;
}
@ -4843,7 +4844,7 @@ void SV_ExtractFromUserinfo (client_t *cl, qboolean verbose)
if (*cl->name && cl->state >= cs_spawned && !cl->spectator && verbose)
{
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTNAMECHANGE, cl->name, newname);
SV_BroadcastTPrintf (PRINT_HIGH, "%s changed their name to %s\n", cl->name, newname);
}
Q_strncpyz (cl->name, newname, sizeof(cl->namebuf));
@ -4855,7 +4856,7 @@ void SV_ExtractFromUserinfo (client_t *cl, qboolean verbose)
#ifdef SVRANKING
}
else if (cl->state >= cs_spawned && *rank_filename.string && verbose)
SV_ClientPrintf(cl, PRINT_HIGH, "Your rankings name has not been changed\n");
SV_ClientTPrintf(cl, PRINT_HIGH, "Your rankings name has not been changed\n");
#endif
}
}
@ -4863,22 +4864,17 @@ void SV_ExtractFromUserinfo (client_t *cl, qboolean verbose)
Info_SetValueForKey(cl->userinfo, "name", newname, sizeof(cl->userinfo));
val = Info_ValueForKey (cl->userinfo, "lang");
cl->language = atoi(val);
if (!cl->language)
cl->language = LANGDEFAULT;
cl->language = *val?TL_FindLanguage(val):svs.language;
val = Info_ValueForKey (cl->userinfo, "nogib");
if (atoi(val))
cl->gibfilter = true;
else
cl->gibfilter = false;
cl->gibfilter = !!atoi(val);
// rate command
val = Info_ValueForKey (cl->userinfo, "rate");
if (strlen(val))
cl->rate = atoi(val);
else
cl->rate = ISNQCLIENT(cl)?10000:2500;
cl->rate = ISNQCLIENT(cl)?10000:2500; //an nq client cannot cope with quakeworld's default rate, and typically doesn't have rate set either.
val = Info_ValueForKey (cl->userinfo, "drate");
if (strlen(val))
@ -5057,11 +5053,11 @@ void SV_Init (quakeparms_t *parms)
Cbuf_Execute ();
Con_TPrintf (TL_EXEDATETIME, __DATE__, __TIME__);
Con_TPrintf ("Exe: %s %s\n", __DATE__, __TIME__);
Con_Printf ("%s\n", version_string());
Con_TPrintf (STL_INITED, *fs_gamename.string?fs_gamename.string:"Nothing");
Con_TPrintf ("======== %s Initialized ========\n", *fs_gamename.string?fs_gamename.string:"Nothing");
// if a map wasn't specified on the command line, spawn start.map
//aliases require that we flush the cbuf in order to actually see the results.

View file

@ -79,7 +79,7 @@ void ClientReliable_FinishWrite(client_t *cl)
if (cl->backbuf.overflowed)
{
if (!cl->netchan.message.overflowed)
Con_TPrintf (STL_MESSAGEOVERFLOW,cl->num_backbuf,cl->name);
Con_TPrintf ("WARNING: backbuf [%d] reliable overflow for %s\n",cl->num_backbuf,cl->name);
cl->netchan.message.overflowed = true; // this will drop the client
}
}

View file

@ -231,7 +231,8 @@ EVENT MESSAGES
=============================================================================
*/
void SV_PrintToClient(client_t *cl, int level, char *string)
//Directly print to a client without translating nor printing into an mvd. generally for error messages due to the lack of mvd thing.
void SV_PrintToClient(client_t *cl, int level, const char *string)
{
switch (cl->protocol)
{
@ -265,6 +266,12 @@ void SV_PrintToClient(client_t *cl, int level, char *string)
break;
}
}
//translate it, but avoid 'public' mvd prints.
void SV_TPrintToClient(client_t *cl, int level, const char *string)
{
string = langtext(string, cl->language);
SV_PrintToClient(cl, level, string);
}
void SV_StuffcmdToClient(client_t *cl, char *string)
{
@ -298,6 +305,7 @@ void SV_StuffcmdToClient(client_t *cl, char *string)
SV_ClientPrintf
Sends text across to be displayed if the level passes
Is included in mvds.
=================
*/
void VARGS SV_ClientPrintf (client_t *cl, int level, char *fmt, ...)
@ -333,7 +341,7 @@ void VARGS SV_ClientTPrintf (client_t *cl, int level, translation_t stringnum, .
{
va_list argptr;
char string[1024];
char *fmt = languagetext[stringnum][cl->language];
const char *fmt = langtext(stringnum, cl->language);
if (level < cl->messagelevel)
return;
@ -411,7 +419,7 @@ void VARGS SV_BroadcastTPrintf (int level, translation_t stringnum, ...)
client_t *cl;
int i;
int oldlang=-1;
char *fmt = languagetext[stringnum][oldlang=svs.language];
const char *fmt = langtext(stringnum, oldlang=svs.language);
va_start (argptr,stringnum);
vsnprintf (string,sizeof(string)-1, fmt,argptr);
@ -433,7 +441,7 @@ void VARGS SV_BroadcastTPrintf (int level, translation_t stringnum, ...)
if (oldlang!=cl->language)
{
fmt = languagetext[stringnum][oldlang=cl->language];
fmt = langtext(stringnum, oldlang=cl->language);
va_start (argptr,stringnum);
vsnprintf (string,sizeof(string)-1, fmt,argptr);

View file

@ -257,7 +257,7 @@ void SV_New_f (void)
//spawns. These functions are written to not overflow
/* if (host_client->num_backbuf)
{
Con_TPrintf(STL_BACKBUFSET, host_client->name, host_client->netchan.message.cursize);
Con_Printf("WARNING %s: [SV_New] Back buffered (%d0, clearing)\n", host_client->name, host_client->netchan.message.cursize);
host_client->num_backbuf = 0;
SZ_Clear(&host_client->netchan.message);
}
@ -1429,7 +1429,7 @@ void SVQW_PreSpawn_f (void)
{
char *msg;
SV_ClientTPrintf (host_client, PRINT_HIGH,
STL_MAPCHEAT,
"Map model file does not match (%s), %i != %i/%i.\nYou may need a new version of the map, or the proper install files.\n",
sv.modelname, check, sv.world.worldmodel->checksum, sv.world.worldmodel->checksum2);
@ -1848,7 +1848,7 @@ void SV_Begin_f (void)
if (pmodel != sv.model_player_checksum ||
emodel != sv.eyes_player_checksum)
SV_BroadcastTPrintf (PRINT_HIGH, STL_POSSIBLEMODELCHEAT, host_client->name);
SV_BroadcastTPrintf (PRINT_HIGH, "warning: %s eyes or player model does not match\n", host_client->name);
}
// if we are paused, tell the client
@ -1860,7 +1860,7 @@ void SV_Begin_f (void)
ClientReliableWrite_Byte (host_client, sv.paused!=0);
}
if (sv.paused&~4)
SV_ClientTPrintf(host_client, PRINT_HIGH, STL_SERVERPAUSED);
SV_ClientTPrintf(host_client, PRINT_HIGH, "server is paused\n");
}
if (sendangles)
@ -1997,7 +1997,7 @@ void SV_NextChunkedDownload(unsigned int chunknum, int ezpercent, int ezfilenum)
if (chunknum*CHUNKSIZE > host_client->downloadsize)
{
SV_ClientPrintf (host_client, PRINT_HIGH, "Warning: Invalid file chunk requested %u to %u of %u.\n", chunknum*CHUNKSIZE, (chunknum+1)*CHUNKSIZE, host_client->downloadsize);
SV_ClientTPrintf (host_client, PRINT_HIGH, "Warning: Invalid file chunk requested %u to %u of %u.\n", chunknum*CHUNKSIZE, (chunknum+1)*CHUNKSIZE, host_client->downloadsize);
error = 2;
}
@ -2187,7 +2187,7 @@ void SV_NextUpload (void)
if (!*host_client->uploadfn)
{
SV_ClientTPrintf(host_client, PRINT_HIGH, STL_UPLOADDENIED);
SV_ClientTPrintf(host_client, PRINT_HIGH, "Upload denied\n");
ClientReliableWrite_Begin (host_client, svc_stufftext, 8);
ClientReliableWrite_String (host_client, "stopul\n");
@ -3032,8 +3032,7 @@ void SV_SayOne_f (void)
if (host_client->ismuted)
{
SV_ClientTPrintf(host_client, PRINT_CHAT,
STL_YOUAREMUTED);
SV_ClientTPrintf(host_client, PRINT_CHAT, "%s is muted\n");
return;
}
@ -3072,7 +3071,7 @@ void SV_SayOne_f (void)
if (clnum==-1) //none found
{
SV_ClientTPrintf(host_client, PRINT_CHAT, STL_NAMEDCLIENTDOESNTEXIST);
SV_ClientTPrintf(host_client, PRINT_CHAT, "client does not exist\n");
return;
}
}
@ -3167,8 +3166,7 @@ void SV_Say (qboolean team)
if (host_client->ismuted)
{
SV_ClientTPrintf(host_client, PRINT_CHAT,
STL_MUTEDCHAT);
SV_ClientTPrintf(host_client, PRINT_CHAT, "You cannot chat while muted\n");
return;
}
@ -3179,9 +3177,7 @@ void SV_Say (qboolean team)
if ((floodtime=SV_CheckFloodProt(host_client)))
{
SV_ClientTPrintf(host_client, PRINT_CHAT,
STL_FLOODPROTTIME,
(int) (floodtime));
SV_ClientTPrintf(host_client, PRINT_CHAT, "You can't talk for %i more seconds\n", (int) (floodtime));
return;
}
SV_PushFloodProt(host_client);
@ -3196,7 +3192,7 @@ void SV_Say (qboolean team)
if (strlen(text)+strlen(p)+2 >= sizeof(text)-10)
{
SV_ClientTPrintf(host_client, PRINT_CHAT, STL_BUFFERPROTECTION);
SV_ClientTPrintf(host_client, PRINT_CHAT, "buffer overflow protection: failiure\n");
return;
}
if (svprogfuncs)
@ -3399,7 +3395,7 @@ void SV_Kill_f (void)
if (sv_player->v->health <= 0)
{
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_NOSUICIDEWHENDEAD);
SV_ClientTPrintf (host_client, PRINT_HIGH, "Can't suicide -- Already dead\n");
return;
}
@ -3450,22 +3446,22 @@ void SV_Pause_f (void)
{
if (!pausable.value)
{
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_CANTPAUSE);
SV_ClientTPrintf (host_client, PRINT_HIGH, "Can't pause. Not allowed\n");
return;
}
if (host_client->spectator && !svs.demoplayback)
{
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_CANTPAUSESPEC);
SV_ClientTPrintf (host_client, PRINT_HIGH, "Spectators may not pause the game\n");
return;
}
if (SV_TogglePause(host_client))
{
if (sv.paused & 1)
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTPAUSED, host_client->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s paused the game\n", host_client->name);
else
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTUNPAUSED, host_client->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s unpaused the game\n", host_client->name);
}
}
@ -3490,7 +3486,7 @@ void SV_Drop_f (void)
else
{
if (!host_client->spectator)
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTDROPPED, host_client->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s dropped\n", host_client->name);
}
host_client->drop = true;
}
@ -3536,7 +3532,7 @@ void SV_PTrack_f (void)
if (!SV_CanTrack(host_client, i+1))
{
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_INVALIDTRACKCLIENT);
SV_ClientTPrintf (host_client, PRINT_HIGH, "invalid player to track\n");
host_client->spec_track = 0;
ent = EDICT_NUM(svprogfuncs, host_client - svs.clients + 1);
tent = EDICT_NUM(svprogfuncs, 0);
@ -3573,7 +3569,7 @@ void SV_Rate_f (void)
Info_SetValueForKey (host_client->userinfo, "rate", Cmd_Argv(1), sizeof(host_client->userinfo));
SV_ExtractFromUserinfo (host_client, true);
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_RATESETTO, SV_RateForClient(host_client));
SV_ClientTPrintf (host_client, PRINT_HIGH, "rate is changed to %i\n", SV_RateForClient(host_client));
}
@ -3588,14 +3584,14 @@ void SV_Msg_f (void)
{
if (Cmd_Argc() != 2)
{
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_CURRENTMSGLEVEL,
SV_ClientTPrintf (host_client, PRINT_HIGH, "current msg level is %i\n",
host_client->messagelevel);
return;
}
host_client->messagelevel = atoi(Cmd_Argv(1));
SV_ClientTPrintf (host_client, PRINT_HIGH, STL_MSGLEVELSET, host_client->messagelevel);
SV_ClientTPrintf (host_client, PRINT_HIGH, "new msg level set to %i\n", host_client->messagelevel);
}
qboolean SV_UserInfoIsBasic(char *infoname)
@ -3755,7 +3751,7 @@ void SV_NoSnap_f(void)
if (*host_client->uploadfn)
{
*host_client->uploadfn = 0;
SV_BroadcastTPrintf (PRINT_HIGH, STL_SNAPREFUSED, host_client->name);
SV_BroadcastTPrintf (PRINT_HIGH, "%s refused remote screenshot\n", host_client->name);
}
}
@ -3860,12 +3856,12 @@ void SV_Vote_f (void)
if (!votelevel.value)
{
SV_ClientTPrintf(host_client, PRINT_HIGH, STL_NOVOTING);
SV_ClientTPrintf(host_client, PRINT_HIGH, "Voting was dissallowed\n");
return;
}
if (host_client->ismuted)
{
SV_ClientTPrintf(host_client, PRINT_HIGH, STL_MUTEDVOTE);
SV_ClientTPrintf(host_client, PRINT_HIGH, "Sorry, you cannot vote when muted as it may allow you to send a message.\n");
return;
}
@ -3879,7 +3875,7 @@ void SV_Vote_f (void)
base = NULL;
if (strchr(command, ';') || !strcmp(command, "if"))
{
SV_ClientTPrintf(host_client, PRINT_HIGH, STL_BADVOTE);
SV_ClientTPrintf(host_client, PRINT_HIGH, "You arn't allowed to vote for that\n");
return;
}
num = Cmd_Level(command);
@ -3887,7 +3883,7 @@ void SV_Vote_f (void)
*base = ' ';
if (num != Cmd_ExecLevel)
{
SV_ClientTPrintf(host_client, PRINT_HIGH, STL_BADVOTE);
SV_ClientTPrintf(host_client, PRINT_HIGH, "You arn't allowed to vote for that\n");
return;
}
@ -3901,13 +3897,13 @@ void SV_Vote_f (void)
if (VoteCount(command, id))
{
VoteRemoveCommands(command, id);
SV_ClientTPrintf(host_client, PRINT_HIGH, STL_OLDVOTEREMOVED);
SV_ClientTPrintf(host_client, PRINT_HIGH, "Old vote removed.\n");
return;
}
if (VoteCount(NULL, id)>=3)
{
VoteRemoveCommands(NULL, id);
SV_ClientTPrintf(host_client, PRINT_HIGH, STL_VOTESREMOVED);
SV_ClientTPrintf(host_client, PRINT_HIGH, "All votes removed.\n");
}
num = VoteCount(command, -1)+1;
@ -3922,7 +3918,7 @@ void SV_Vote_f (void)
if (passes) //>min number of votes, and meets the percent required
{
SV_BroadcastTPrintf(PRINT_HIGH, STL_FINALVOTE, host_client->name, command);
SV_BroadcastTPrintf(PRINT_HIGH, "%s casts final vote for '%s'\n", host_client->name, command);
VoteRemoveCommands(command, -1);
Cbuf_AddText(command, votelevel.value);
@ -3932,7 +3928,7 @@ void SV_Vote_f (void)
}
else //otherwise, try later.
{
SV_BroadcastTPrintf(PRINT_HIGH, STL_VOTE, host_client->name, command);
SV_BroadcastTPrintf(PRINT_HIGH, "%s casts a vote for '%s'\n", host_client->name, command);
VoteAdd(command, id);
}
@ -3958,15 +3954,15 @@ void Cmd_God_f (void)
{
if (!SV_MayCheat())
{
SV_PrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
return;
}
SV_LogPlayer(host_client, "god cheat");
if ((int) (sv_player->v->flags = (int) sv_player->v->flags ^ FL_GODMODE) & FL_GODMODE)
SV_ClientPrintf (host_client, PRINT_HIGH, "godmode ON\n");
SV_ClientTPrintf (host_client, PRINT_HIGH, "godmode ON\n");
else
SV_ClientPrintf (host_client, PRINT_HIGH, "godmode OFF\n");
SV_ClientTPrintf (host_client, PRINT_HIGH, "godmode OFF\n");
}
@ -3985,7 +3981,7 @@ void Cmd_Give_f (void)
if (!SV_MayCheat())
{
SV_PrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
return;
}
@ -4024,21 +4020,21 @@ void Cmd_Give_f (void)
sv_player->v->ammo_cells = v;
break;
default:
Con_Printf("give: unknown item\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "give: unknown item\n");
}
}
else
{
if (developer.value < 2 && host_client->netchan.remote_address.type != NA_LOOPBACK) //we don't want clients doing nasty things... like setting movetype 3123
{
SV_PrintToClient(host_client, PRINT_HIGH, "'give' debugging command requires developer 2 set on the server before you may use it\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "'give' debugging command requires developer 2 set on the server before you may use it\n");
}
else
{
int oldself;
oldself = pr_global_struct->self;
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, sv_player);
SV_ClientPrintf(host_client, PRINT_HIGH, "Result: %s\n", svprogfuncs->EvaluateDebugString(svprogfuncs, Cmd_Args()));
SV_ClientTPrintf(host_client, PRINT_HIGH, "Result: %s\n", svprogfuncs->EvaluateDebugString(svprogfuncs, Cmd_Args()));
pr_global_struct->self = oldself;
}
}
@ -4048,7 +4044,7 @@ void Cmd_Noclip_f (void)
{
if (!SV_MayCheat())
{
SV_PrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
return;
}
@ -4057,7 +4053,7 @@ void Cmd_Noclip_f (void)
{
sv_player->v->movetype = MOVETYPE_NOCLIP;
sv_player->v->solid = SOLID_TRIGGER;
SV_ClientPrintf (host_client, PRINT_HIGH, "noclip ON\n");
SV_ClientTPrintf (host_client, PRINT_HIGH, "noclip ON\n");
}
else
{
@ -4066,7 +4062,7 @@ void Cmd_Noclip_f (void)
sv_player->v->solid = SOLID_SLIDEBOX;
else
sv_player->v->solid = SOLID_NOT;
SV_ClientPrintf (host_client, PRINT_HIGH, "noclip OFF\n");
SV_ClientTPrintf (host_client, PRINT_HIGH, "noclip OFF\n");
}
}
@ -4074,7 +4070,7 @@ void Cmd_Fly_f (void)
{
if (!SV_MayCheat())
{
SV_PrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
return;
}
@ -4082,7 +4078,7 @@ void Cmd_Fly_f (void)
if (sv_player->v->movetype != MOVETYPE_FLY)
{
sv_player->v->movetype = MOVETYPE_FLY;
SV_ClientPrintf (host_client, PRINT_HIGH, "flymode ON\n");
SV_ClientTPrintf (host_client, PRINT_HIGH, "flymode ON\n");
}
else
{
@ -4091,7 +4087,7 @@ void Cmd_Fly_f (void)
sv_player->v->solid = SOLID_SLIDEBOX;
else
sv_player->v->solid = SOLID_NOT;
SV_ClientPrintf (host_client, PRINT_HIGH, "flymode OFF\n");
SV_ClientTPrintf (host_client, PRINT_HIGH, "flymode OFF\n");
}
}
@ -4105,7 +4101,7 @@ void Cmd_SetPos_f(void)
{
if (!SV_MayCheat())
{
SV_PrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Cheats are not allowed on this server\n");
return;
}
@ -4118,7 +4114,7 @@ void Cmd_SetPos_f(void)
if (sv_player->v->movetype != MOVETYPE_NOCLIP)
{
sv_player->v->movetype = MOVETYPE_NOCLIP;
SV_PrintToClient(host_client, PRINT_HIGH, "noclip on\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "noclip on\n");
}
sv_player->v->origin[0] = atof(Cmd_Argv(1));
@ -4197,19 +4193,19 @@ void Cmd_Join_f (void)
if (svs.gametype != GT_PROGS)
{
SV_PrintToClient(host_client, PRINT_HIGH, "Sorry, not implemented in this gamecode type. Try moaning at the dev team\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Sorry, not implemented in this gamecode type. Try moaning at the dev team\n");
return;
}
if (!(host_client->zquake_extensions & Z_EXT_JOIN_OBSERVE))
{
SV_PrintToClient(host_client, PRINT_HIGH, "Your QW client doesn't support this command\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Your game client doesn't support this command\n");
return;
}
if (password.string[0] && stricmp(password.string, "none"))
{
SV_ClientPrintf(host_client, PRINT_HIGH, "This server requires a %s password. Please disconnect, set the password and reconnect as %s.\n", "player", "player");
SV_ClientTPrintf(host_client, PRINT_HIGH, "This server requires a %s password. Please disconnect, set the password and reconnect as %s.\n", "player", "player");
return;
}
@ -4225,7 +4221,7 @@ void Cmd_Join_f (void)
}
if (numclients+seats > maxclients.value)
{
SV_PrintToClient(host_client, PRINT_HIGH, "Can't join, all player slots full\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Can't join, all player slots full\n");
return;
}
@ -4307,19 +4303,19 @@ void Cmd_Observe_f (void)
if (svs.gametype != GT_PROGS)
{
SV_PrintToClient(host_client, PRINT_HIGH, "Sorry, not implemented in this gamecode type. Try moaning at the dev team\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Sorry, not implemented in this gamecode type. Try moaning at the dev team\n");
return;
}
if (!(host_client->zquake_extensions & Z_EXT_JOIN_OBSERVE))
{
SV_PrintToClient(host_client, PRINT_HIGH, "Your QW client doesn't support this command\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Your game client doesn't support this command\n");
return;
}
if (spectator_password.string[0] && stricmp(spectator_password.string, "none"))
{
SV_ClientPrintf(host_client, PRINT_HIGH, "This server requires a %s password. Please disconnect, set the password and reconnect as %s.\n", "spectator", "spectator");
SV_ClientTPrintf(host_client, PRINT_HIGH, "This server requires a %s password. Please disconnect, set the password and reconnect as %s.\n", "spectator", "spectator");
return;
}
@ -4335,7 +4331,7 @@ void Cmd_Observe_f (void)
}
if (numspectators+seats > maxspectators.value)
{
SV_PrintToClient(host_client, PRINT_HIGH, "Can't join, all spectator slots full\n");
SV_TPrintToClient(host_client, PRINT_HIGH, "Can't join, all spectator slots full\n");
return;
}
@ -4489,7 +4485,7 @@ void SV_DisableClientsCSQC(void)
}
void SV_UserCmdMVDList_f (void);
void SV_STFU_f(void)
static void SV_STFU_f(void)
{
char *msg;
SV_ClientPrintf(host_client, 255, "stfu\n");
@ -4663,7 +4659,7 @@ void SVNQ_Begin_f (void)
if (pmodel != sv.model_player_checksum ||
emodel != sv.eyes_player_checksum)
SV_BroadcastPrintf (PRINT_HIGH, "warning: %s eyes or player model not verified\n", host_client->name);
SV_BroadcastTPrintf (PRINT_HIGH, "warning: %s eyes or player model not verified\n", host_client->name);
}
@ -4676,7 +4672,7 @@ void SVNQ_Begin_f (void)
ClientReliableWrite_Byte (host_client, sv.paused!=0);
}
if (sv.paused&~4)
SV_ClientTPrintf(host_client, PRINT_HIGH, STL_SERVERPAUSED!=0);
SV_ClientTPrintf(host_client, PRINT_HIGH, "server is paused\n");
}
if (sendangles)
@ -4785,6 +4781,8 @@ void SVNQ_Ping_f(void)
int i;
client_t *cl;
//don't translate this, most advanced clients (including us) automate and parse them, the results being visible in the scoreboard and NOT the console.
//translating these prints can thus confuse things greatly.
SV_PrintToClient(host_client, PRINT_HIGH, "Client ping times:\n");
for (i=0,cl=svs.clients ; i<MAX_CLIENTS ; i++,cl++)
{
@ -4897,7 +4895,7 @@ ucmd_t ucmds[] =
{"begin", SV_Begin_f, true},
/*ezquake warning*/
{"al", SV_STFU_f, true},
{"al", SV_STFU_f, true}, //can probably be removed now.
{"drop", SV_Drop_f},
{"disconnect", SV_Drop_f},
@ -5148,7 +5146,7 @@ void SV_ExecuteUserCommand (char *s, qboolean fromQC)
return;
}
Con_Printf ("cmd from %s:\n%s\n"
Con_TPrintf ("cmd from %s:\n%s\n"
, host_client->name, net_message.data+4);
SV_BeginRedirect (RD_CLIENT, host_client->language);
@ -5176,7 +5174,7 @@ void SV_ExecuteUserCommand (char *s, qboolean fromQC)
return;
}
#endif
Con_Printf ("Bad user command: %s\n", Cmd_Argv(0));
Con_TPrintf ("Bad user command: %s\n", Cmd_Argv(0));
}
host_client = oldhost;
@ -5572,14 +5570,14 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse)
{
host_client->msec_cheating++;
SV_BroadcastTPrintf(PRINT_HIGH,
STL_SPEEDCHEATPOSSIBLE,
"Speed cheat possibility, analyzing:\n %d %.1f %d for: %s\n",
host_client->msecs, tmp_time,
host_client->msec_cheating, host_client->name);
if (host_client->msec_cheating >= 2)
{
SV_BroadcastTPrintf(PRINT_HIGH,
STL_SPEEDCHEATKICKED,
"%s was kicked for speedcheating (%s)\n",
host_client->name, NET_AdrToString(adr, sizeof(adr), &host_client->netchan.remote_address));
host_client->drop = true; //drop later
}

View file

@ -195,7 +195,7 @@ void Info_SetValueForStarKey (char *s, const char *key, const char *value, int m
// don't change it!
if (strlen(value) - strlen(v) + strlen(s) + 1 > maxsize)
{
// Con_TPrintf (TL_INFOSTRINGTOOLONG);
// Con_Printf ("Info string length exceeded\n");
return;
}
}

View file

@ -255,7 +255,7 @@ BUILTINR(float, cos, (float f));
#endif
char *va(char *format, ...) //Identical in function to the one in Quake, though I can assure you that I wrote it...
char *va(const char *format, ...) //Identical in function to the one in Quake, though I can assure you that I wrote it...
{ //It's not exactly hard, just easy to use, so gets duplicated lots.
va_list argptr;
static char string[1024];

View file

@ -247,7 +247,7 @@ EBUILTIN(qhandle_t, Net_Accept, (qhandle_t socket, char *address, int addresssiz
EBUILTIN(int, Net_Recv, (qhandle_t socket, void *buffer, int len));
EBUILTIN(int, Net_Send, (qhandle_t socket, void *buffer, int len));
EBUILTIN(void, Net_Close, (qhandle_t socket));
#define N_WOULDBLOCK -1
#define N_WOULDBLOCK 0
#define NET_CLIENTPORT -1
#define NET_SERVERPORT -2
@ -261,7 +261,7 @@ EBUILTIN(float, sin, (float f));
#endif
typedef qintptr_t (*export_t) (qintptr_t *args);
char *va(char *format, ...);
char *va(const char *format, ...);
qintptr_t Plug_Init(qintptr_t *args);
qboolean Plug_Export(const char *name, export_t func);
void Con_Printf(const char *format, ...);