#include "server.h"
Include dependency graph for sv_ccmds.c:

Go to the source code of this file.
Functions | |
| void | SV_AddOperatorCommands (void) |
| void | SV_Ban_f (void) |
| void | SV_BanNum_f (void) |
| void | SV_ConSay_f (void) |
| void | SV_DumpUser_f (void) |
| client_t * | SV_GetPlayerByName (void) |
| client_t * | SV_GetPlayerByNum (void) |
| void | SV_Heartbeat_f (void) |
| void | SV_Kick_f (void) |
| void | SV_KickNum_f (void) |
| void | SV_KillServer_f (void) |
| void | SV_Map_f (void) |
| void | SV_MapRestart_f (void) |
| void | SV_RemoveOperatorCommands (void) |
| void | SV_Serverinfo_f (void) |
| void | SV_Status_f (void) |
| void | SV_Systeminfo_f (void) |
|
|
Definition at line 710 of file sv_ccmds.c. References Cmd_AddCommand(), com_dedicated, cvar_s::integer, qboolean, SV_Ban_f(), SV_BanNum_f(), SV_ConSay_f(), SV_DumpUser_f(), SV_Heartbeat_f(), SV_Kick_f(), SV_KickNum_f(), SV_KillServer_f(), SV_Map_f(), SV_MapRestart_f(), SV_SectorList_f(), SV_Serverinfo_f(), SV_Status_f(), and SV_Systeminfo_f(). Referenced by SV_Init(). 00710 {
00711 static qboolean initialized;
00712
00713 if ( initialized ) {
00714 return;
00715 }
00716 initialized = qtrue;
00717
00718 Cmd_AddCommand ("heartbeat", SV_Heartbeat_f);
00719 Cmd_AddCommand ("kick", SV_Kick_f);
00720 Cmd_AddCommand ("banUser", SV_Ban_f);
00721 Cmd_AddCommand ("banClient", SV_BanNum_f);
00722 Cmd_AddCommand ("clientkick", SV_KickNum_f);
00723 Cmd_AddCommand ("status", SV_Status_f);
00724 Cmd_AddCommand ("serverinfo", SV_Serverinfo_f);
00725 Cmd_AddCommand ("systeminfo", SV_Systeminfo_f);
00726 Cmd_AddCommand ("dumpuser", SV_DumpUser_f);
00727 Cmd_AddCommand ("map_restart", SV_MapRestart_f);
00728 Cmd_AddCommand ("sectorlist", SV_SectorList_f);
00729 Cmd_AddCommand ("map", SV_Map_f);
00730 #ifndef PRE_RELEASE_DEMO
00731 Cmd_AddCommand ("devmap", SV_Map_f);
00732 Cmd_AddCommand ("spmap", SV_Map_f);
00733 Cmd_AddCommand ("spdevmap", SV_Map_f);
00734 #endif
00735 Cmd_AddCommand ("killserver", SV_KillServer_f);
00736 if( com_dedicated->integer ) {
00737 Cmd_AddCommand ("say", SV_ConSay_f);
00738 }
00739 }
|
Here is the call graph for this function:

|
|
Definition at line 390 of file sv_ccmds.c. References AUTHORIZE_SERVER_NAME, serverStatic_t::authorizeAddress, BigShort(), cl, client_t, Cmd_Argc(), Com_Printf(), com_sv_running, cvar_s::integer, netadr_t::ip, NET_OutOfBandPrint(), NET_StringToAdr(), NS_SERVER, NULL, netadr_t::port, PORT_AUTHORIZE, SV_GetPlayerByName(), SV_SendServerCommand(), svs, and netadr_t::type. Referenced by SV_AddOperatorCommands(). 00390 {
00391 client_t *cl;
00392
00393 // make sure server is running
00394 if ( !com_sv_running->integer ) {
00395 Com_Printf( "Server is not running.\n" );
00396 return;
00397 }
00398
00399 if ( Cmd_Argc() != 2 ) {
00400 Com_Printf ("Usage: banUser <player name>\n");
00401 return;
00402 }
00403
00404 cl = SV_GetPlayerByName();
00405
00406 if (!cl) {
00407 return;
00408 }
00409
00410 if( cl->netchan.remoteAddress.type == NA_LOOPBACK ) {
00411 SV_SendServerCommand(NULL, "print \"%s\"", "Cannot kick host player\n");
00412 return;
00413 }
00414
00415 // look up the authorize server's IP
00416 if ( !svs.authorizeAddress.ip[0] && svs.authorizeAddress.type != NA_BAD ) {
00417 Com_Printf( "Resolving %s\n", AUTHORIZE_SERVER_NAME );
00418 if ( !NET_StringToAdr( AUTHORIZE_SERVER_NAME, &svs.authorizeAddress ) ) {
00419 Com_Printf( "Couldn't resolve address\n" );
00420 return;
00421 }
00422 svs.authorizeAddress.port = BigShort( PORT_AUTHORIZE );
00423 Com_Printf( "%s resolved to %i.%i.%i.%i:%i\n", AUTHORIZE_SERVER_NAME,
00424 svs.authorizeAddress.ip[0], svs.authorizeAddress.ip[1],
00425 svs.authorizeAddress.ip[2], svs.authorizeAddress.ip[3],
00426 BigShort( svs.authorizeAddress.port ) );
00427 }
00428
00429 // otherwise send their ip to the authorize server
00430 if ( svs.authorizeAddress.type != NA_BAD ) {
00431 NET_OutOfBandPrint( NS_SERVER, svs.authorizeAddress,
00432 "banUser %i.%i.%i.%i", cl->netchan.remoteAddress.ip[0], cl->netchan.remoteAddress.ip[1],
00433 cl->netchan.remoteAddress.ip[2], cl->netchan.remoteAddress.ip[3] );
00434 Com_Printf("%s was banned from coming back\n", cl->name);
00435 }
00436 }
|
Here is the call graph for this function:

|
|
Definition at line 446 of file sv_ccmds.c. References AUTHORIZE_SERVER_NAME, serverStatic_t::authorizeAddress, BigShort(), cl, client_t, Cmd_Argc(), Com_Printf(), com_sv_running, cvar_s::integer, netadr_t::ip, NET_OutOfBandPrint(), NET_StringToAdr(), NS_SERVER, NULL, netadr_t::port, PORT_AUTHORIZE, SV_GetPlayerByNum(), SV_SendServerCommand(), svs, and netadr_t::type. Referenced by SV_AddOperatorCommands(). 00446 {
00447 client_t *cl;
00448
00449 // make sure server is running
00450 if ( !com_sv_running->integer ) {
00451 Com_Printf( "Server is not running.\n" );
00452 return;
00453 }
00454
00455 if ( Cmd_Argc() != 2 ) {
00456 Com_Printf ("Usage: banClient <client number>\n");
00457 return;
00458 }
00459
00460 cl = SV_GetPlayerByNum();
00461 if ( !cl ) {
00462 return;
00463 }
00464 if( cl->netchan.remoteAddress.type == NA_LOOPBACK ) {
00465 SV_SendServerCommand(NULL, "print \"%s\"", "Cannot kick host player\n");
00466 return;
00467 }
00468
00469 // look up the authorize server's IP
00470 if ( !svs.authorizeAddress.ip[0] && svs.authorizeAddress.type != NA_BAD ) {
00471 Com_Printf( "Resolving %s\n", AUTHORIZE_SERVER_NAME );
00472 if ( !NET_StringToAdr( AUTHORIZE_SERVER_NAME, &svs.authorizeAddress ) ) {
00473 Com_Printf( "Couldn't resolve address\n" );
00474 return;
00475 }
00476 svs.authorizeAddress.port = BigShort( PORT_AUTHORIZE );
00477 Com_Printf( "%s resolved to %i.%i.%i.%i:%i\n", AUTHORIZE_SERVER_NAME,
00478 svs.authorizeAddress.ip[0], svs.authorizeAddress.ip[1],
00479 svs.authorizeAddress.ip[2], svs.authorizeAddress.ip[3],
00480 BigShort( svs.authorizeAddress.port ) );
00481 }
00482
00483 // otherwise send their ip to the authorize server
00484 if ( svs.authorizeAddress.type != NA_BAD ) {
00485 NET_OutOfBandPrint( NS_SERVER, svs.authorizeAddress,
00486 "banUser %i.%i.%i.%i", cl->netchan.remoteAddress.ip[0], cl->netchan.remoteAddress.ip[1],
00487 cl->netchan.remoteAddress.ip[2], cl->netchan.remoteAddress.ip[3] );
00488 Com_Printf("%s was banned from coming back\n", cl->name);
00489 }
00490 }
|
Here is the call graph for this function:

|
|
Definition at line 596 of file sv_ccmds.c. References Cmd_Argc(), Cmd_Args(), Com_Printf(), com_sv_running, cvar_s::integer, NULL, p, strcat(), strcpy(), strlen(), and SV_SendServerCommand(). Referenced by SV_AddOperatorCommands(). 00596 {
00597 char *p;
00598 char text[1024];
00599
00600 // make sure server is running
00601 if ( !com_sv_running->integer ) {
00602 Com_Printf( "Server is not running.\n" );
00603 return;
00604 }
00605
00606 if ( Cmd_Argc () < 2 ) {
00607 return;
00608 }
00609
00610 strcpy (text, "console: ");
00611 p = Cmd_Args();
00612
00613 if ( *p == '"' ) {
00614 p++;
00615 p[strlen(p)-1] = 0;
00616 }
00617
00618 strcat(text, p);
00619
00620 SV_SendServerCommand(NULL, "chat \"%s\n\"", text);
00621 }
|
Here is the call graph for this function:

|
|
Definition at line 669 of file sv_ccmds.c. References cl, client_t, Cmd_Argc(), Com_Printf(), com_sv_running, Info_Print(), cvar_s::integer, and SV_GetPlayerByName(). Referenced by SV_AddOperatorCommands(). 00669 {
00670 client_t *cl;
00671
00672 // make sure server is running
00673 if ( !com_sv_running->integer ) {
00674 Com_Printf( "Server is not running.\n" );
00675 return;
00676 }
00677
00678 if ( Cmd_Argc() != 2 ) {
00679 Com_Printf ("Usage: info <userid>\n");
00680 return;
00681 }
00682
00683 cl = SV_GetPlayerByName();
00684 if ( !cl ) {
00685 return;
00686 }
00687
00688 Com_Printf( "userinfo\n" );
00689 Com_Printf( "--------\n" );
00690 Info_Print( cl->userinfo );
00691 }
|
Here is the call graph for this function:

|
|
Definition at line 42 of file sv_ccmds.c. References cl, client_t, serverStatic_t::clients, Cmd_Argc(), Cmd_Argv(), Com_Printf(), com_sv_running, i, cvar_s::integer, Q_CleanStr(), Q_stricmp(), Q_strncpyz(), s, sv_maxclients, and svs. Referenced by SV_Ban_f(), SV_DumpUser_f(), and SV_Kick_f(). 00042 {
00043 client_t *cl;
00044 int i;
00045 char *s;
00046 char cleanName[64];
00047
00048 // make sure server is running
00049 if ( !com_sv_running->integer ) {
00050 return NULL;
00051 }
00052
00053 if ( Cmd_Argc() < 2 ) {
00054 Com_Printf( "No player specified.\n" );
00055 return NULL;
00056 }
00057
00058 s = Cmd_Argv(1);
00059
00060 // check for a name match
00061 for ( i=0, cl=svs.clients ; i < sv_maxclients->integer ; i++,cl++ ) {
00062 if ( !cl->state ) {
00063 continue;
00064 }
00065 if ( !Q_stricmp( cl->name, s ) ) {
00066 return cl;
00067 }
00068
00069 Q_strncpyz( cleanName, cl->name, sizeof(cleanName) );
00070 Q_CleanStr( cleanName );
00071 if ( !Q_stricmp( cleanName, s ) ) {
00072 return cl;
00073 }
00074 }
00075
00076 Com_Printf( "Player %s is not on the server\n", s );
00077
00078 return NULL;
00079 }
|
Here is the call graph for this function:

|
|
Definition at line 88 of file sv_ccmds.c. References atoi, cl, client_t, serverStatic_t::clients, Cmd_Argc(), Cmd_Argv(), Com_Printf(), com_sv_running, i, cvar_s::integer, s, sv_maxclients, and svs. Referenced by SV_BanNum_f(), and SV_KickNum_f(). 00088 {
00089 client_t *cl;
00090 int i;
00091 int idnum;
00092 char *s;
00093
00094 // make sure server is running
00095 if ( !com_sv_running->integer ) {
00096 return NULL;
00097 }
00098
00099 if ( Cmd_Argc() < 2 ) {
00100 Com_Printf( "No player specified.\n" );
00101 return NULL;
00102 }
00103
00104 s = Cmd_Argv(1);
00105
00106 for (i = 0; s[i]; i++) {
00107 if (s[i] < '0' || s[i] > '9') {
00108 Com_Printf( "Bad slot number: %s\n", s);
00109 return NULL;
00110 }
00111 }
00112 idnum = atoi( s );
00113 if ( idnum < 0 || idnum >= sv_maxclients->integer ) {
00114 Com_Printf( "Bad client slot: %i\n", idnum );
00115 return NULL;
00116 }
00117
00118 cl = &svs.clients[idnum];
00119 if ( !cl->state ) {
00120 Com_Printf( "Client %i is not active\n", idnum );
00121 return NULL;
00122 }
00123 return cl;
00124
00125 return NULL;
00126 }
|
Here is the call graph for this function:

|
|
Definition at line 631 of file sv_ccmds.c. References serverStatic_t::nextHeartbeatTime, and svs. Referenced by SV_AddOperatorCommands(), SV_DirectConnect(), SV_DropClient(), and SV_SpawnServer(). 00631 {
00632 svs.nextHeartbeatTime = -9999999;
00633 }
|
|
|
Definition at line 330 of file sv_ccmds.c. References cl, client_t, serverStatic_t::clients, Cmd_Argc(), Cmd_Argv(), Com_Printf(), com_sv_running, i, cvar_s::integer, NULL, Q_stricmp(), SV_DropClient(), SV_GetPlayerByName(), sv_maxclients, SV_SendServerCommand(), svs, and serverStatic_t::time. Referenced by SV_AddOperatorCommands(). 00330 {
00331 client_t *cl;
00332 int i;
00333
00334 // make sure server is running
00335 if ( !com_sv_running->integer ) {
00336 Com_Printf( "Server is not running.\n" );
00337 return;
00338 }
00339
00340 if ( Cmd_Argc() != 2 ) {
00341 Com_Printf ("Usage: kick <player name>\nkick all = kick everyone\nkick allbots = kick all bots\n");
00342 return;
00343 }
00344
00345 cl = SV_GetPlayerByName();
00346 if ( !cl ) {
00347 if ( !Q_stricmp(Cmd_Argv(1), "all") ) {
00348 for ( i=0, cl=svs.clients ; i < sv_maxclients->integer ; i++,cl++ ) {
00349 if ( !cl->state ) {
00350 continue;
00351 }
00352 if( cl->netchan.remoteAddress.type == NA_LOOPBACK ) {
00353 continue;
00354 }
00355 SV_DropClient( cl, "was kicked" );
00356 cl->lastPacketTime = svs.time; // in case there is a funny zombie
00357 }
00358 }
00359 else if ( !Q_stricmp(Cmd_Argv(1), "allbots") ) {
00360 for ( i=0, cl=svs.clients ; i < sv_maxclients->integer ; i++,cl++ ) {
00361 if ( !cl->state ) {
00362 continue;
00363 }
00364 if( cl->netchan.remoteAddress.type != NA_BOT ) {
00365 continue;
00366 }
00367 SV_DropClient( cl, "was kicked" );
00368 cl->lastPacketTime = svs.time; // in case there is a funny zombie
00369 }
00370 }
00371 return;
00372 }
00373 if( cl->netchan.remoteAddress.type == NA_LOOPBACK ) {
00374 SV_SendServerCommand(NULL, "print \"%s\"", "Cannot kick host player\n");
00375 return;
00376 }
00377
00378 SV_DropClient( cl, "was kicked" );
00379 cl->lastPacketTime = svs.time; // in case there is a funny zombie
00380 }
|
Here is the call graph for this function:

|
|
Definition at line 499 of file sv_ccmds.c. References cl, client_t, Cmd_Argc(), Com_Printf(), com_sv_running, cvar_s::integer, NULL, SV_DropClient(), SV_GetPlayerByNum(), SV_SendServerCommand(), svs, and serverStatic_t::time. Referenced by SV_AddOperatorCommands(). 00499 {
00500 client_t *cl;
00501
00502 // make sure server is running
00503 if ( !com_sv_running->integer ) {
00504 Com_Printf( "Server is not running.\n" );
00505 return;
00506 }
00507
00508 if ( Cmd_Argc() != 2 ) {
00509 Com_Printf ("Usage: kicknum <client number>\n");
00510 return;
00511 }
00512
00513 cl = SV_GetPlayerByNum();
00514 if ( !cl ) {
00515 return;
00516 }
00517 if( cl->netchan.remoteAddress.type == NA_LOOPBACK ) {
00518 SV_SendServerCommand(NULL, "print \"%s\"", "Cannot kick host player\n");
00519 return;
00520 }
00521
00522 SV_DropClient( cl, "was kicked" );
00523 cl->lastPacketTime = svs.time; // in case there is a funny zombie
00524 }
|
Here is the call graph for this function:

|
|
Definition at line 699 of file sv_ccmds.c. References SV_Shutdown(). Referenced by SV_AddOperatorCommands(). 00699 {
00700 SV_Shutdown( "killserver" );
00701 }
|
Here is the call graph for this function:

|
|
Definition at line 138 of file sv_ccmds.c. References Cmd_Argv(), Com_Printf(), Com_sprintf(), Cvar_Get(), CVAR_LATCH, CVAR_SERVERINFO, Cvar_Set(), Cvar_SetLatched(), Cvar_SetValue(), CVAR_USERINFO, FS_ReadFile(), GT_FFA, GT_SINGLE_PLAYER, cvar_s::integer, NULL, Q_stricmp(), Q_stricmpn(), Q_strncpyz(), qboolean, sv_gametype, and SV_SpawnServer(). Referenced by SV_AddOperatorCommands(). 00138 {
00139 char *cmd;
00140 char *map;
00141 qboolean killBots, cheat;
00142 char expanded[MAX_QPATH];
00143 char mapname[MAX_QPATH];
00144
00145 map = Cmd_Argv(1);
00146 if ( !map ) {
00147 return;
00148 }
00149
00150 // make sure the level exists before trying to change, so that
00151 // a typo at the server console won't end the game
00152 Com_sprintf (expanded, sizeof(expanded), "maps/%s.bsp", map);
00153 if ( FS_ReadFile (expanded, NULL) == -1 ) {
00154 Com_Printf ("Can't find map %s\n", expanded);
00155 return;
00156 }
00157
00158 // force latched values to get set
00159 Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH );
00160
00161 cmd = Cmd_Argv(0);
00162 if( Q_stricmpn( cmd, "sp", 2 ) == 0 ) {
00163 Cvar_SetValue( "g_gametype", GT_SINGLE_PLAYER );
00164 Cvar_SetValue( "g_doWarmup", 0 );
00165 // may not set sv_maxclients directly, always set latched
00166 Cvar_SetLatched( "sv_maxclients", "8" );
00167 cmd += 2;
00168 cheat = qfalse;
00169 killBots = qtrue;
00170 }
00171 else {
00172 if ( !Q_stricmp( cmd, "devmap" ) || !Q_stricmp( cmd, "spdevmap" ) ) {
00173 cheat = qtrue;
00174 killBots = qtrue;
00175 } else {
00176 cheat = qfalse;
00177 killBots = qfalse;
00178 }
00179 if( sv_gametype->integer == GT_SINGLE_PLAYER ) {
00180 Cvar_SetValue( "g_gametype", GT_FFA );
00181 }
00182 }
00183
00184 // save the map name here cause on a map restart we reload the q3config.cfg
00185 // and thus nuke the arguments of the map command
00186 Q_strncpyz(mapname, map, sizeof(mapname));
00187
00188 // start up the map
00189 SV_SpawnServer( mapname, killBots );
00190
00191 // set the cheat value
00192 // if the level was started with "map <levelname>", then
00193 // cheats will not be allowed. If started with "devmap <levelname>"
00194 // then cheats will be allowed
00195 if ( cheat ) {
00196 Cvar_Set( "sv_cheats", "1" );
00197 } else {
00198 Cvar_Set( "sv_cheats", "0" );
00199 }
00200 }
|
Here is the call graph for this function:

|
|
Definition at line 210 of file sv_ccmds.c. References atoi, client_t, serverStatic_t::clients, Cmd_Argc(), Cmd_Argv(), com_frameTime, Com_Printf(), com_sv_running, CS_WARMUP, Cvar_Set(), Cvar_VariableString(), Cvar_VariableValue(), GAME_CLIENT_CONNECT, GAME_RUN_FRAME, gvm, i, cvar_s::integer, client_s::lastUsercmd, cvar_s::modified, client_s::netchan, Q_strncpyz(), qboolean, qfalse, netchan_t::remoteAddress, server_t::restarting, server_t::restartTime, server_t::serverId, serverStatic_t::snapFlagServerBit, client_s::state, server_t::state, sv, SV_AddServerCommand(), SV_ClientEnterWorld(), SV_DropClient(), sv_gametype, sv_maxclients, SV_RestartGameProgs(), SV_SetConfigstring(), SV_SpawnServer(), svs, serverStatic_t::time, netadr_t::type, va(), VM_Call(), and VM_ExplicitArgPtr(). Referenced by SV_AddOperatorCommands(). 00210 {
00211 int i;
00212 client_t *client;
00213 char *denied;
00214 qboolean isBot;
00215 int delay;
00216
00217 // make sure we aren't restarting twice in the same frame
00218 if ( com_frameTime == sv.serverId ) {
00219 return;
00220 }
00221
00222 // make sure server is running
00223 if ( !com_sv_running->integer ) {
00224 Com_Printf( "Server is not running.\n" );
00225 return;
00226 }
00227
00228 if ( sv.restartTime ) {
00229 return;
00230 }
00231
00232 if (Cmd_Argc() > 1 ) {
00233 delay = atoi( Cmd_Argv(1) );
00234 }
00235 else {
00236 delay = 5;
00237 }
00238 if( delay && !Cvar_VariableValue("g_doWarmup") ) {
00239 sv.restartTime = svs.time + delay * 1000;
00240 SV_SetConfigstring( CS_WARMUP, va("%i", sv.restartTime) );
00241 return;
00242 }
00243
00244 // check for changes in variables that can't just be restarted
00245 // check for maxclients change
00246 if ( sv_maxclients->modified || sv_gametype->modified ) {
00247 char mapname[MAX_QPATH];
00248
00249 Com_Printf( "variable change -- restarting.\n" );
00250 // restart the map the slow way
00251 Q_strncpyz( mapname, Cvar_VariableString( "mapname" ), sizeof( mapname ) );
00252
00253 SV_SpawnServer( mapname, qfalse );
00254 return;
00255 }
00256
00257 // toggle the server bit so clients can detect that a
00258 // map_restart has happened
00259 svs.snapFlagServerBit ^= SNAPFLAG_SERVERCOUNT;
00260
00261 // generate a new serverid
00262 // TTimo - don't update restartedserverId there, otherwise we won't deal correctly with multiple map_restart
00263 sv.serverId = com_frameTime;
00264 Cvar_Set( "sv_serverid", va("%i", sv.serverId ) );
00265
00266 // reset all the vm data in place without changing memory allocation
00267 // note that we do NOT set sv.state = SS_LOADING, so configstrings that
00268 // had been changed from their default values will generate broadcast updates
00269 sv.state = SS_LOADING;
00270 sv.restarting = qtrue;
00271
00272 SV_RestartGameProgs();
00273
00274 // run a few frames to allow everything to settle
00275 for ( i = 0 ;i < 3 ; i++ ) {
00276 VM_Call( gvm, GAME_RUN_FRAME, svs.time );
00277 svs.time += 100;
00278 }
00279
00280 sv.state = SS_GAME;
00281 sv.restarting = qfalse;
00282
00283 // connect and begin all the clients
00284 for (i=0 ; i<sv_maxclients->integer ; i++) {
00285 client = &svs.clients[i];
00286
00287 // send the new gamestate to all connected clients
00288 if ( client->state < CS_CONNECTED) {
00289 continue;
00290 }
00291
00292 if ( client->netchan.remoteAddress.type == NA_BOT ) {
00293 isBot = qtrue;
00294 } else {
00295 isBot = qfalse;
00296 }
00297
00298 // add the map_restart command
00299 SV_AddServerCommand( client, "map_restart\n" );
00300
00301 // connect the client again, without the firstTime flag
00302 denied = VM_ExplicitArgPtr( gvm, VM_Call( gvm, GAME_CLIENT_CONNECT, i, qfalse, isBot ) );
00303 if ( denied ) {
00304 // this generally shouldn't happen, because the client
00305 // was connected before the level change
00306 SV_DropClient( client, denied );
00307 Com_Printf( "SV_MapRestart_f(%d): dropped client %i - denied!\n", delay, i ); // bk010125
00308 continue;
00309 }
00310
00311 client->state = CS_ACTIVE;
00312
00313 SV_ClientEnterWorld( client, &client->lastUsercmd );
00314 }
00315
00316 // run another frame to allow things to look at all the players
00317 VM_Call( gvm, GAME_RUN_FRAME, svs.time );
00318 svs.time += 100;
00319 }
|
Here is the call graph for this function:

|
|
Definition at line 746 of file sv_ccmds.c. References Cmd_RemoveCommand(). Referenced by SV_Shutdown(). 00746 {
00747 #if 0
00748 // removing these won't let the server start again
00749 Cmd_RemoveCommand ("heartbeat");
00750 Cmd_RemoveCommand ("kick");
00751 Cmd_RemoveCommand ("banUser");
00752 Cmd_RemoveCommand ("banClient");
00753 Cmd_RemoveCommand ("status");
00754 Cmd_RemoveCommand ("serverinfo");
00755 Cmd_RemoveCommand ("systeminfo");
00756 Cmd_RemoveCommand ("dumpuser");
00757 Cmd_RemoveCommand ("map_restart");
00758 Cmd_RemoveCommand ("sectorlist");
00759 Cmd_RemoveCommand ("say");
00760 #endif
00761 }
|
Here is the call graph for this function:

|
|
Definition at line 643 of file sv_ccmds.c. References Com_Printf(), Cvar_InfoString(), CVAR_SERVERINFO, and Info_Print(). Referenced by SV_AddOperatorCommands(). 00643 {
00644 Com_Printf ("Server info settings:\n");
00645 Info_Print ( Cvar_InfoString( CVAR_SERVERINFO ) );
00646 }
|
Here is the call graph for this function:

|
|
Definition at line 531 of file sv_ccmds.c. References cl, client_t, serverStatic_t::clients, Com_Printf(), com_sv_running, i, cvar_s::integer, j, l, NET_AdrToString(), PERS_SCORE, playerState_s::persistant, playerState_t, s, cvar_s::string, strlen(), SV_GameClientNum(), sv_mapname, sv_maxclients, svs, and serverStatic_t::time. Referenced by SV_AddOperatorCommands(). 00531 {
00532 int i, j, l;
00533 client_t *cl;
00534 playerState_t *ps;
00535 const char *s;
00536 int ping;
00537
00538 // make sure server is running
00539 if ( !com_sv_running->integer ) {
00540 Com_Printf( "Server is not running.\n" );
00541 return;
00542 }
00543
00544 Com_Printf ("map: %s\n", sv_mapname->string );
00545
00546 Com_Printf ("num score ping name lastmsg address qport rate\n");
00547 Com_Printf ("--- ----- ---- --------------- ------- --------------------- ----- -----\n");
00548 for (i=0,cl=svs.clients ; i < sv_maxclients->integer ; i++,cl++)
00549 {
00550 if (!cl->state)
00551 continue;
00552 Com_Printf ("%3i ", i);
00553 ps = SV_GameClientNum( i );
00554 Com_Printf ("%5i ", ps->persistant[PERS_SCORE]);
00555
00556 if (cl->state == CS_CONNECTED)
00557 Com_Printf ("CNCT ");
00558 else if (cl->state == CS_ZOMBIE)
00559 Com_Printf ("ZMBI ");
00560 else
00561 {
00562 ping = cl->ping < 9999 ? cl->ping : 9999;
00563 Com_Printf ("%4i ", ping);
00564 }
00565
00566 Com_Printf ("%s", cl->name);
00567 // TTimo adding a ^7 to reset the color
00568 // NOTE: colored names in status breaks the padding (WONTFIX)
00569 Com_Printf ("^7");
00570 l = 16 - strlen(cl->name);
00571 for (j=0 ; j<l ; j++)
00572 Com_Printf (" ");
00573
00574 Com_Printf ("%7i ", svs.time - cl->lastPacketTime );
00575
00576 s = NET_AdrToString( cl->netchan.remoteAddress );
00577 Com_Printf ("%s", s);
00578 l = 22 - strlen(s);
00579 for (j=0 ; j<l ; j++)
00580 Com_Printf (" ");
00581
00582 Com_Printf ("%5i", cl->netchan.qport);
00583
00584 Com_Printf (" %5i", cl->rate);
00585
00586 Com_Printf ("\n");
00587 }
00588 Com_Printf ("\n");
00589 }
|
Here is the call graph for this function:

|
|
Definition at line 656 of file sv_ccmds.c. References Com_Printf(), Cvar_InfoString(), CVAR_SYSTEMINFO, and Info_Print(). Referenced by SV_AddOperatorCommands(). 00656 {
00657 Com_Printf ("System info settings:\n");
00658 Info_Print ( Cvar_InfoString( CVAR_SYSTEMINFO ) );
00659 }
|
Here is the call graph for this function:

1.3.9.1