diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-03-05 20:14:36 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-03-05 20:14:36 +0000 |
commit | bf0e48bb73e2d6846e15335e3625290d1f9ebc52 (patch) | |
tree | e2804860de7d1b59c263ec04f81044b35a7369f2 /source/mvd_client.c | |
parent | 856cdd0f2fafeaa31c7398c8877180c68364842d (diff) |
Rewrote autocompletion engine.
Added `con_notifylines' variable.
Do not allow chat beeps to overlap.
Diffstat (limited to 'source/mvd_client.c')
-rw-r--r-- | source/mvd_client.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/source/mvd_client.c b/source/mvd_client.c index 96f1ecf..a6b199f 100644 --- a/source/mvd_client.c +++ b/source/mvd_client.c @@ -961,8 +961,8 @@ static const cmd_option_t o_mvdconnect[] = { { NULL } }; -const char *MVD_Connect_g( const char *partial, int argnum, int state ) { - return Cmd_Completer( o_mvdconnect, partial, argnum, state, Com_AddressGenerator ); +void MVD_Connect_c( genctx_t *ctx, int argnum ) { + Cmd_Option_c( o_mvdconnect, Com_Address_g, ctx, argnum ); } /* @@ -1239,13 +1239,12 @@ static const cmd_option_t o_mvdplay[] = { { NULL } }; -static const char *MVD_FileGenerator( const char *partial, int state ) { - return Com_FileNameGeneratorByFilter( "demos", "*.mvd2;*.mvd2.gz", - partial, qfalse, state ); +void MVD_File_g( genctx_t *ctx ) { + FS_File_g( "demos", "*.mvd2;*.mvd2.gz", FS_SEARCH_SAVEPATH | FS_SEARCH_BYFILTER | 0x80000000, ctx ); } -const char *MVD_Play_g( const char *partial, int argnum, int state ) { - return Cmd_Completer( o_mvdplay, partial, argnum, state, MVD_FileGenerator ); +static void MVD_Play_c( genctx_t *ctx, int argnum ) { + Cmd_Option_c( o_mvdplay, MVD_File_g, ctx, argnum ); } void MVD_Play_f( void ) { @@ -1368,8 +1367,8 @@ void MVD_Shutdown( void ) { } static const cmdreg_t c_mvd[] = { - { "mvdplay", MVD_Play_f, MVD_Play_g }, - { "mvdconnect", MVD_Connect_f, MVD_Connect_g }, + { "mvdplay", MVD_Play_f, MVD_Play_c }, + { "mvdconnect", MVD_Connect_f, MVD_Connect_c }, { "mvdisconnect", MVD_Disconnect_f }, { "mvdkill", MVD_Kill_f }, { "mvdspawn", MVD_Spawn_f }, |