Go to the documentation of this file.
119 strcat (status,
"\n");
120 statusLength = (
int)strlen(status);
127 Com_sprintf (player,
sizeof(player),
"%i %i \"%s\"\n",
129 playerLength = (
int)strlen(player);
130 if (statusLength + playerLength >=
sizeof(status) )
132 strcpy (status + statusLength, player);
133 statusLength += playerLength;
233 oldestTime = 0x7fffffff;
288 Com_DPrintf (
" rejected connect from version %i\n", version);
296 strncpy (userinfo,
Cmd_Argv(4),
sizeof(userinfo)-1);
297 userinfo[
sizeof(userinfo) - 1] = 0;
307 Com_Printf (
"Remote connect in attract loop. Ignored.\n");
334 memset (newcl, 0,
sizeof(
client_t));
342 && (
cl->netchan.qport ==
qport
343 || adr.
port ==
cl->netchan.remote_address.port ) )
436 char remaining[1024];
458 strcat (remaining,
" ");
492 if (!strcmp(c,
"ping"))
494 else if (!strcmp(c,
"ack"))
496 else if (!strcmp(c,
"status"))
498 else if (!strcmp(c,
"info"))
500 else if (!strcmp(c,
"getchallenge"))
502 else if (!strcmp(c,
"connect"))
504 else if (!strcmp(c,
"rcon"))
507 Com_Printf (
"bad connectionless packet from %s:\n%s\n"
534 if (
cl->lastframe > 0)
544 if (
cl->frame_latency[
j] > 0)
547 total +=
cl->frame_latency[
j];
554 cl->ping = total*100/
count - 100;
560 cl->edict->client->ping =
cl->ping;
587 cl->commandMsec = 1800;
626 if (
cl->netchan.qport !=
qport)
630 Com_Printf (
"SV_ReadPackets: fixing up a translated port\n");
680 &&
cl->lastmessage < zombiepoint)
686 &&
cl->lastmessage < droppoint)
826 #define HEARTBEAT_SECONDS 300
912 for (
i=0 ;
i<
sizeof(
cl->name) ;
i++)
923 if (
cl->rate > 15000)
933 cl->messagelevel = atoi(val);
1047 memset (&
sv, 0,
sizeof(
sv));
1057 memset (&
svs, 0,
sizeof(
svs));
cvar_t * sv_airaccelerate
void SV_FinalMessage(char *message, qboolean reconnect)
void SV_ConnectionlessPacket(void)
CONST PIXELFORMATDESCRIPTOR int
void SVC_DirectConnect(void)
void Com_SetServerState(int state)
void SV_ReadPackets(void)
void SV_FlushRedirect(int sv_redirected, char *outputbuf)
int MSG_ReadShort(sizebuf_t *msg_read)
void SVC_RemoteCommand(void)
void SV_CheckTimeouts(void)
void SV_BroadcastPrintf(int level, char *fmt,...)
char * NET_AdrToString(netadr_t a)
challenge_t challenges[MAX_CHALLENGES]
void SZ_Init(sizebuf_t *buf, byte *data, int length)
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
void Cmd_ExecuteString(char *text)
cvar_t * allow_download_players
qboolean(* ClientConnect)(edict_t *ent, char *userinfo)
void SZ_Clear(sizebuf_t *buf)
qboolean NET_CompareBaseAdr(netadr_t a, netadr_t b)
void(* ClientDisconnect)(edict_t *ent)
void(* ClientUserinfoChanged)(edict_t *ent, char *userinfo)
void Cmd_TokenizeString(char *text, qboolean macroExpand)
char * va(char *format,...)
entity_state_t * client_entities
#define HEARTBEAT_SECONDS
char sv_outputbuf[SV_OUTPUTBUF_LENGTH]
void Com_BeginRedirect(int target, char *buffer, int buffersize, void(*flush))
char * Info_ValueForKey(char *s, char *key)
void Com_EndRedirect(void)
cvar_t * sv_reconnect_limit
void SV_ExecuteClientMessage(client_t *cl)
void SV_UserinfoChanged(client_t *cl)
void MSG_WriteString(sizebuf_t *sb, char *s)
void SV_RunGameFrame(void)
cvar_t * allow_download_models
void MSG_WriteByte(sizebuf_t *sb, int c)
char * MSG_ReadStringLine(sizebuf_t *msg_read)
qboolean Netchan_Process(netchan_t *chan, sizebuf_t *msg)
char * SV_StatusString(void)
#define SV_OUTPUTBUF_LENGTH
void SV_SendClientMessages(void)
void Netchan_Setup(netsrc_t sock, netchan_t *chan, netadr_t adr, int qport)
void Info_SetValueForKey(char *s, char *key, char *value)
void Master_Heartbeat(void)
qboolean NET_IsLocalAddress(netadr_t adr)
void SVC_GetChallenge(void)
int MSG_ReadLong(sizebuf_t *msg_read)
void SV_RecordDemoMessage(void)
qboolean NET_GetPacket(netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
byte datagram_buf[MAX_MSGLEN]
void Netchan_Transmit(netchan_t *chan, int length, byte *data)
byte net_message_buffer[MAX_MSGLEN]
void Netchan_OutOfBandPrint(int net_socket, netadr_t adr, char *format,...)
void Com_DPrintf(char *fmt,...)
cvar_t * allow_download_sounds
void FS_FreeFile(void *buffer)
void Com_Printf(char *fmt,...)
int Sys_Milliseconds(void)
void Master_Shutdown(void)
void SV_InitOperatorCommands(void)
void SV_PrepWorldFrame(void)
netadr_t master_adr[MAX_MASTERS]
char userinfo[MAX_INFO_STRING]
void MSG_BeginReading(sizebuf_t *msg)
cvar_t * allow_download_maps
char * Cvar_Serverinfo(void)
void Com_sprintf(char *dest, int size, char *fmt,...)
void SV_Shutdown(char *finalmsg, qboolean reconnect)
void SV_DropClient(client_t *drop)