Tidy up man page and usage text

This commit is contained in:
Tiiffi
2019-10-21 21:35:38 +03:00
parent 8f561f803a
commit 16c2db5c78
2 changed files with 28 additions and 26 deletions

View File

@ -3,7 +3,7 @@
.\"
.TH MCRCON 1 "October 2019" "Version 0.6.2"
.SH NAME
mcrcon \- sends rcon commands to a Minecraft server
mcrcon \- send rcon commands to a Minecraft server
.SH SYNOPSIS
.B mcrcon [
options
@ -11,31 +11,32 @@ options
commands
.B ]
.SH DESCRIPTION
mcrcon is Minecraft rcon client / terminal with bukkit coloring support.
It is well suited for remote administration and server maintenance scripts.
mcrcon is Minecraft rcon client for remote administration and server maintenance scripts.
.SH OPTIONS
.IP -h
Print usage
.IP -H
Server address (default is localhost)
Server address (default: localhost)
.IP -P
Port (default is 25575)
Port (default: 25575)
.IP -p
Rcon password
.IP -t
Interactive terminal mode
Terminal mode
.IP -s
Silent mode (do not print received packets)
Silent mode
.IP -c
Disable colors
.IP -r
Output raw packets (for debugging and custom handling)
Output raw packets
.IP -h
Print usage
.IP -v
Output version information
.PP
Commands with arguments must be enclosed in quotes.
Commands with spaces must be enclosed in quotes.
.br
mcrcon will start in terminal mode if no commands are given.
.SH ENVIRONMENTAL VARIABLES
Server address, port and password can be set using following environment variables:
Server address, port and password can be set with following environment variables:
.PP
\fBMCRCON_HOST
.br
@ -55,7 +56,7 @@ Send "weather clear" command to server using custom port 1337
\fBmcrcon\fR -H my.minecraft.server -P 1337 -p password "weather clear"
.RE
.PP
Send three commands to server (say, save-all and stop)
Send three commands to server ("say", "save-all" and "stop")
.RS
\fBmcrcon\fR -H my.minecraft.server -p password "say Server is restarting!" save-all stop
.RE

View File

@ -188,7 +188,7 @@ int main(int argc, char *argv[])
if (pass == NULL)
{
fputs("Password not defined (-p flag). Try 'mcrcon -h' or 'man mcrcon' for more information.\n\n", stdout);
fputs("You must give password (-p password). Try 'mcrcon -h' or 'man mcrcon' for help.\n\n", stdout);
return 0;
}
@ -236,27 +236,28 @@ int main(int argc, char *argv[])
void usage(void)
{
fputs(
"Usage: "IN_NAME" [OPTIONS]... [COMMANDS]...\n\n"
"Sends rcon commands to Minecraft server.\n\n"
"Option:\n"
" -h\t\tPrint usage\n"
" -H\t\tServer address (default is localhost)\n"
" -P\t\tPort (default is 25575)\n"
"Usage: "IN_NAME" [OPTIONS] [COMMANDS]\n\n"
"Send rcon commands to Minecraft server.\n\n"
"Options:\n"
" -H\t\tServer address (default: localhost)\n"
" -P\t\tPort (default: 25575)\n"
" -p\t\tRcon password\n"
" -t\t\tInteractive terminal mode\n"
" -s\t\tSilent mode (do not print received packets)\n"
" -t\t\tTerminal mode\n"
" -s\t\tSilent mode\n"
" -c\t\tDisable colors\n"
" -r\t\tOutput raw packets (debugging and custom handling)\n"
" -v\t\tOutput version information\n\n"
"Server address, port and password can be set using following environment variables:\n"
" -r\t\tOutput raw packets\n"
" -h\t\tPrint usage\n"
" -v\t\tVersion information\n\n"
"Server address, port and password can be set with following environment variables:\n"
" MCRCON_HOST\n"
" MCRCON_PORT\n"
" MCRCON_PASS\n\n"
,stdout
);
puts("mcrcon will start in terminal mode if no commands are given.");
puts("Command-line options will override environment variables.");
puts("Rcon commands with arguments must be enclosed in quotes.\n");
puts("Rcon commands with spaces must be enclosed in quotes.\n");
puts("Example:\n\t"IN_NAME" -H my.minecraft.server -p password \"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/\n");