mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
Change more operator commands to require sv_running to be usable. Patch by Ensiform.
This commit is contained in:
parent
262e8e96b6
commit
8234225459
1 changed files with 44 additions and 8 deletions
|
@ -639,6 +639,11 @@ static void SV_RehashBans_f(void)
|
|||
char *textbuf, *curpos, *maskpos, *newlinepos, *endpos;
|
||||
char filepath[MAX_QPATH];
|
||||
|
||||
// make sure server is running
|
||||
if ( !com_sv_running->integer ) {
|
||||
return;
|
||||
}
|
||||
|
||||
serverBansCount = 0;
|
||||
|
||||
if(!sv_banFile->string || !*sv_banFile->string)
|
||||
|
@ -709,7 +714,7 @@ static void SV_RehashBans_f(void)
|
|||
|
||||
/*
|
||||
==================
|
||||
SV_WriteBans_f
|
||||
SV_WriteBans
|
||||
|
||||
Save bans to file.
|
||||
==================
|
||||
|
@ -827,6 +832,12 @@ static void SV_AddBanToList(qboolean isexception)
|
|||
int index, argc, mask;
|
||||
serverBan_t *curban;
|
||||
|
||||
// make sure server is running
|
||||
if ( !com_sv_running->integer ) {
|
||||
Com_Printf( "Server is not running.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
argc = Cmd_Argc();
|
||||
|
||||
if(argc < 2 || argc > 3)
|
||||
|
@ -858,11 +869,6 @@ static void SV_AddBanToList(qboolean isexception)
|
|||
client_t *cl;
|
||||
|
||||
// client num.
|
||||
if(!com_sv_running->integer)
|
||||
{
|
||||
Com_Printf("Server is not running.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
cl = SV_GetPlayerByNum();
|
||||
|
||||
|
@ -968,6 +974,12 @@ static void SV_DelBanFromList(qboolean isexception)
|
|||
netadr_t ip;
|
||||
char *banstring;
|
||||
|
||||
// make sure server is running
|
||||
if ( !com_sv_running->integer ) {
|
||||
Com_Printf( "Server is not running.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
if(Cmd_Argc() != 2)
|
||||
{
|
||||
Com_Printf ("Usage: %s (ip[/subnet] | num)\n", Cmd_Argv(0));
|
||||
|
@ -1053,6 +1065,12 @@ static void SV_ListBans_f(void)
|
|||
int index, count;
|
||||
serverBan_t *ban;
|
||||
|
||||
// make sure server is running
|
||||
if ( !com_sv_running->integer ) {
|
||||
Com_Printf( "Server is not running.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
// List all bans
|
||||
for(index = count = 0; index < serverBansCount; index++)
|
||||
{
|
||||
|
@ -1089,6 +1107,12 @@ Delete all bans and exceptions.
|
|||
|
||||
static void SV_FlushBans_f(void)
|
||||
{
|
||||
// make sure server is running
|
||||
if ( !com_sv_running->integer ) {
|
||||
Com_Printf( "Server is not running.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
serverBansCount = 0;
|
||||
|
||||
// empty the ban file.
|
||||
|
@ -1285,6 +1309,12 @@ Examine the serverinfo string
|
|||
===========
|
||||
*/
|
||||
static void SV_Serverinfo_f( void ) {
|
||||
// make sure server is running
|
||||
if ( !com_sv_running->integer ) {
|
||||
Com_Printf( "Server is not running.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
Com_Printf ("Server info settings:\n");
|
||||
Info_Print ( Cvar_InfoString( CVAR_SERVERINFO ) );
|
||||
}
|
||||
|
@ -1294,10 +1324,16 @@ static void SV_Serverinfo_f( void ) {
|
|||
===========
|
||||
SV_Systeminfo_f
|
||||
|
||||
Examine or change the serverinfo string
|
||||
Examine the systeminfo string
|
||||
===========
|
||||
*/
|
||||
static void SV_Systeminfo_f( void ) {
|
||||
// make sure server is running
|
||||
if ( !com_sv_running->integer ) {
|
||||
Com_Printf( "Server is not running.\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
Com_Printf ("System info settings:\n");
|
||||
Info_Print ( Cvar_InfoString_Big( CVAR_SYSTEMINFO ) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue