diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-02-28 12:09:10 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-02-28 12:09:10 +0000 |
commit | bf6d45c620f098c84d602e9347bc7cf457c38b5a (patch) | |
tree | ec075676ff09467ea910c51fb45fb37185a1ddf3 /source/sv_ccmds.c | |
parent | 4034314816f7ec9e26c9b9bfc2630c8ca0a24874 (diff) |
Do not spam dedicated server console with heartbeats.
Added autocompletion of options for some commands.
Made logfile_prefix not empty by default.
Re-enabled `anti-kick' exploit fix.
Diffstat (limited to 'source/sv_ccmds.c')
-rw-r--r-- | source/sv_ccmds.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/sv_ccmds.c b/source/sv_ccmds.c index 8d8852e..9641cb6 100644 --- a/source/sv_ccmds.c +++ b/source/sv_ccmds.c @@ -75,7 +75,7 @@ static void SV_SetMaster_f( void ) { svs.last_heartbeat = 0; } -static const char *SV_SetPlayer_g( const char *partial, int state ) { +static const char *SV_SetPlayer_g( const char *partial, int argnum, int state ) { static int length; static int index; client_t *client; @@ -83,6 +83,9 @@ static const char *SV_SetPlayer_g( const char *partial, int state ) { if( !svs.initialized ) { return NULL; } + if( argnum != 1 ) { + return NULL; + } if( !state ) { length = strlen( partial ); @@ -216,8 +219,11 @@ static void SV_Map_f( void ) { SV_Map( Cmd_Argv( 1 ), qtrue ); } -static const char *SV_Map_g( const char *partial, int state ) { - return Com_FileNameGenerator( "maps", ".bsp", partial, qtrue, state ); +static const char *SV_Map_g( const char *partial, int argnum, int state ) { + if( argnum == 1 ) { + return Com_FileNameGenerator( "maps", ".bsp", partial, qtrue, state ); + } + return NULL; } //=============================================================== |