mirror of
https://github.com/Tiiffi/mcrcon.git
synced 2025-10-27 19:31:07 -04:00
Update usage and version texts
This commit is contained in:
24
mcrcon.c
24
mcrcon.c
@ -57,7 +57,6 @@
|
|||||||
#define RCON_AUTH_RESPONSE 2
|
#define RCON_AUTH_RESPONSE 2
|
||||||
#define RCON_PID 0xBADC0DE
|
#define RCON_PID 0xBADC0DE
|
||||||
|
|
||||||
|
|
||||||
#define DATA_BUFFSIZE 4096
|
#define DATA_BUFFSIZE 4096
|
||||||
|
|
||||||
// rcon packet structure
|
// rcon packet structure
|
||||||
@ -193,7 +192,8 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
puts(VER_STR"\nhttps://github.com/Tiiffi/mcrcon");
|
puts(VER_STR" - https://github.com/Tiiffi/mcrcon");
|
||||||
|
puts("Bug reports: tiiffi+mcrcon at gmail or https://github.com/Tiiffi/mcrcon/issues/");
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
case 'h': usage(); break;
|
case 'h': usage(); break;
|
||||||
@ -219,9 +219,9 @@ int main(int argc, char *argv[])
|
|||||||
signal(SIGINT, &sighandler);
|
signal(SIGINT, &sighandler);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
net_init_WSA();
|
net_init_WSA();
|
||||||
console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
|
console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
if (console_handle == INVALID_HANDLE_VALUE)
|
if (console_handle == INVALID_HANDLE_VALUE)
|
||||||
console_handle = NULL;
|
console_handle = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
void usage(void)
|
void usage(void)
|
||||||
{
|
{
|
||||||
fputs(
|
puts(
|
||||||
"Usage: "IN_NAME" [OPTIONS] [COMMANDS]\n\n"
|
"Usage: "IN_NAME" [OPTIONS] [COMMANDS]\n\n"
|
||||||
"Send rcon commands to Minecraft server.\n\n"
|
"Send rcon commands to Minecraft server.\n\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
@ -267,15 +267,15 @@ void usage(void)
|
|||||||
"Server address, port and password can be set with following environment variables:\n"
|
"Server address, port and password can be set with following environment variables:\n"
|
||||||
" MCRCON_HOST\n"
|
" MCRCON_HOST\n"
|
||||||
" MCRCON_PORT\n"
|
" MCRCON_PORT\n"
|
||||||
" MCRCON_PASS\n\n"
|
" MCRCON_PASS\n"
|
||||||
,stdout
|
|
||||||
);
|
);
|
||||||
|
|
||||||
puts("- mcrcon will start in terminal mode if no commands are given");
|
puts (
|
||||||
puts("- Command-line options will override environment variables");
|
"- mcrcon will start in terminal mode if no commands are given\n"
|
||||||
puts("- Rcon commands with spaces must be enclosed in quotes\n");
|
"- Command-line options will override environment variables\n"
|
||||||
|
"- Rcon commands with spaces must be enclosed in quotes\n"
|
||||||
|
);
|
||||||
puts("Example:\n\t"IN_NAME" -H my.minecraft.server -p password -w 5 \"say Server is restarting!\" save-all stop\n");
|
puts("Example:\n\t"IN_NAME" -H my.minecraft.server -p password -w 5 \"say Server is restarting!\" save-all stop\n");
|
||||||
puts(VER_STR"\nReport bugs to tiiffi+mcrcon at gmail or https://github.com/Tiiffi/mcrcon/issues/");
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
puts("Press enter to exit.");
|
puts("Press enter to exit.");
|
||||||
|
|||||||
Reference in New Issue
Block a user