MCPcopy Create free account
hub / github.com/JACoders/OpenJK / SV_ExecuteClientCommand

Function SV_ExecuteClientCommand

code/server/sv_client.cpp:332–349  ·  view source on GitHub ↗

================== SV_ExecuteClientCommand ================== */

Source from the content-addressed store, hash-verified

330==================
331*/
332void SV_ExecuteClientCommand( client_t *cl, const char *s ) {
333 ucmd_t *u;
334
335 Cmd_TokenizeString( s );
336
337 // see if it is a server level command
338 for (u=ucmds ; u->name ; u++) {
339 if (!strcmp (Cmd_Argv(0), u->name) ) {
340 u->func( cl );
341 break;
342 }
343 }
344
345 // pass unknown strings to the game
346 if (!u->name && sv.state == SS_GAME) {
347 ge->ClientCommand( cl - svs.clients );
348 }
349}
350
351#define MAX_STRINGCMDS 8
352

Callers 1

SV_ClientCommandFunction · 0.70

Calls 2

Cmd_TokenizeStringFunction · 0.50
Cmd_ArgvFunction · 0.50

Tested by

no test coverage detected