Browse Source

engine: use generic S_USAGE macro everywhere

pull/2/head
Alibek Omarov 2 years ago
parent
commit
17d0b19f9e
  1. 8
      engine/client/cl_demo.c
  2. 2
      engine/common/host.c
  3. 2
      engine/server/sv_cmds.c
  4. 8
      engine/server/sv_filter.c
  5. 2
      engine/server/sv_log.c

8
engine/client/cl_demo.c

@ -1408,7 +1408,7 @@ void CL_PlayDemo_f( void )
if( Cmd_Argc() < 2 ) if( Cmd_Argc() < 2 )
{ {
Con_Printf( S_USAGE "playdemo <demoname>\n" ); Con_Printf( S_USAGE "%s <demoname>\n", Cmd_Argv( 0 ));
return; return;
} }
@ -1535,12 +1535,6 @@ timedemo <demoname>
*/ */
void CL_TimeDemo_f( void ) void CL_TimeDemo_f( void )
{ {
if( Cmd_Argc() != 2 )
{
Con_Printf( S_USAGE "timedemo <demoname>\n" );
return;
}
CL_PlayDemo_f (); CL_PlayDemo_f ();
// cls.td_starttime will be grabbed at the second frame of the demo, so // cls.td_starttime will be grabbed at the second frame of the demo, so

2
engine/common/host.c

@ -74,7 +74,7 @@ void Sys_PrintUsage( void )
#if XASH_MESSAGEBOX == MSGBOX_STDERR #if XASH_MESSAGEBOX == MSGBOX_STDERR
"\n" // dirty hack to not have Xash Error: Usage: on same line "\n" // dirty hack to not have Xash Error: Usage: on same line
#endif // XASH_MESSAGEBOX == MSGBOX_STDERR #endif // XASH_MESSAGEBOX == MSGBOX_STDERR
"Usage:\n" S_USAGE "\n"
#if !XASH_MOBILE_PLATFORM #if !XASH_MOBILE_PLATFORM
#if XASH_WIN32 #if XASH_WIN32
O("<xash>.exe [options] [+command1] [+command2 arg]","") O("<xash>.exe [options] [+command1] [+command2 arg]","")

2
engine/server/sv_cmds.c

@ -249,7 +249,7 @@ void SV_Maps_f( void )
if( Cmd_Argc() != 2 ) if( Cmd_Argc() != 2 )
{ {
Msg( "Usage: maps <substring>\nmaps * for full listing\n" ); Msg( S_USAGE "maps <substring>\nmaps * for full listing\n" );
return; return;
} }

8
engine/server/sv_filter.c

@ -162,7 +162,7 @@ static void SV_BanID_f( void )
if( !id[0] ) if( !id[0] )
{ {
Con_Reportf( "Usage: banid <minutes> <#userid or unique id>\n0 minutes for permanent ban\n" ); Con_Reportf( S_USAGE "banid <minutes> <#userid or unique id>\n0 minutes for permanent ban\n" );
return; return;
} }
@ -259,7 +259,7 @@ static void SV_RemoveID_f( void )
if( !id[0] ) if( !id[0] )
{ {
Con_Reportf("Usage: removeid <#slotnumber or uniqueid>\n"); Con_Reportf( S_USAGE "removeid <#slotnumber or uniqueid>\n");
return; return;
} }
@ -354,7 +354,7 @@ static void SV_AddIP_f( void )
if( !StringToIP( ipstr, maskstr, &ip, &mask ) ) if( !StringToIP( ipstr, maskstr, &ip, &mask ) )
{ {
Con_Reportf( "Usage: addip <minutes> <ip> [mask]\n0 minutes for permanent ban\n"); Con_Reportf( S_USAGE "addip <minutes> <ip> [mask]\n0 minutes for permanent ban\n");
return; return;
} }
@ -394,7 +394,7 @@ static void SV_RemoveIP_f( void )
if( !StringToIP( Cmd_Argv(1), Cmd_Argv(2), &ip, &mask ) ) if( !StringToIP( Cmd_Argv(1), Cmd_Argv(2), &ip, &mask ) )
{ {
Con_Reportf( "Usage: removeip <ip> [mask]\n" ); Con_Reportf( S_USAGE "removeip <ip> [mask]\n" );
return; return;
} }

2
engine/server/sv_log.c

@ -214,7 +214,7 @@ void SV_ServerLog_f( void )
{ {
if( Cmd_Argc() != 2 ) if( Cmd_Argc() != 2 )
{ {
Con_Printf("usage: log < on|off >\n" ); Con_Printf( S_USAGE "log < on|off >\n" );
if( svs.log.active ) if( svs.log.active )
Con_Printf( "currently logging\n" ); Con_Printf( "currently logging\n" );

Loading…
Cancel
Save