mirror of
https://github.com/Tiiffi/mcrcon.git
synced 2025-10-28 03:41:07 -04:00
Merge pull request #26 from taingra/develop
Added default address set to localhost
This commit is contained in:
22
CHANGELOG.md
22
CHANGELOG.md
@ -1,9 +1,13 @@
|
|||||||
####Version history:
|
#### Version history:
|
||||||
######0.6.1
|
|
||||||
|
###### 0.6.2
|
||||||
|
- Set default address to localhost
|
||||||
|
|
||||||
|
###### 0.6.1
|
||||||
- Color coding fixed
|
- Color coding fixed
|
||||||
* Thanks to Hagb @ Github
|
* Thanks to Hagb @ Github
|
||||||
|
|
||||||
######0.6.0
|
###### 0.6.0
|
||||||
- Version numbering changed to more sane system (0.0.5 -> 0.6.0)
|
- Version numbering changed to more sane system (0.0.5 -> 0.6.0)
|
||||||
- Fixed munged output
|
- Fixed munged output
|
||||||
- Support for using environment variables to set some basic options
|
- Support for using environment variables to set some basic options
|
||||||
@ -14,7 +18,7 @@
|
|||||||
- Man page added
|
- Man page added
|
||||||
- Proper makefile added
|
- Proper makefile added
|
||||||
|
|
||||||
######0.0.5
|
###### 0.0.5
|
||||||
- IPv6 support!
|
- IPv6 support!
|
||||||
* Thanks to 'Tanja84dk' for addressing the real need of IPv6.
|
* Thanks to 'Tanja84dk' for addressing the real need of IPv6.
|
||||||
|
|
||||||
@ -34,20 +38,20 @@
|
|||||||
|
|
||||||
- Client now tries to clean the incoming socket data if last package was out of spec.
|
- Client now tries to clean the incoming socket data if last package was out of spec.
|
||||||
|
|
||||||
######0.0.4
|
###### 0.0.4
|
||||||
- Reverted back to default getopts options error handler (opterr = 1).
|
- Reverted back to default getopts options error handler (opterr = 1).
|
||||||
Custom error handler requires rewriting.
|
Custom error handler requires rewriting.
|
||||||
- Some cosmetic changes in program output strings.
|
- Some cosmetic changes in program output strings.
|
||||||
- Program usage(); function now waits for enter before exiting on Windows.
|
- Program usage(); function now waits for enter before exiting on Windows.
|
||||||
|
|
||||||
######0.0.3
|
###### 0.0.3
|
||||||
- Colors are now supported on Windows too!
|
- Colors are now supported on Windows too!
|
||||||
- Terminal mode is now triggered with "-t" flag. "-i" flag still works for
|
- Terminal mode is now triggered with "-t" flag. "-i" flag still works for
|
||||||
backwards compatibility.
|
backwards compatibility.
|
||||||
- Bug fixes (Packet size check always evaluating false and color validity
|
- Bug fixes (Packet size check always evaluating false and color validity
|
||||||
check always evaluating true).
|
check always evaluating true).
|
||||||
|
|
||||||
######0.0.2
|
###### 0.0.2
|
||||||
- License changed from 'ISC License' to 'zlib/libpng License'.
|
- License changed from 'ISC License' to 'zlib/libpng License'.
|
||||||
- Bug fixes & code cleanups
|
- Bug fixes & code cleanups
|
||||||
- Interactive mode (-i flag). Client acts as interactive terminal.
|
- Interactive mode (-i flag). Client acts as interactive terminal.
|
||||||
@ -55,14 +59,14 @@
|
|||||||
If connecting or authentication fails, the return value is -1.
|
If connecting or authentication fails, the return value is -1.
|
||||||
- Colors are now enabled by default. Now '-c' flag disables the color support.
|
- Colors are now enabled by default. Now '-c' flag disables the color support.
|
||||||
|
|
||||||
######0.0.1
|
###### 0.0.1
|
||||||
- Added experimental support for bukkit colors.
|
- Added experimental support for bukkit colors.
|
||||||
Should work with any sh compatible shell.
|
Should work with any sh compatible shell.
|
||||||
- Packet string data limited to max 2048 (DATA_BUFFSIZE) bytes.
|
- Packet string data limited to max 2048 (DATA_BUFFSIZE) bytes.
|
||||||
No idea how Minecraft handles multiple rcon packets.
|
No idea how Minecraft handles multiple rcon packets.
|
||||||
If someone knows, please mail me so I can implement it.
|
If someone knows, please mail me so I can implement it.
|
||||||
|
|
||||||
####TODO:
|
#### TODO:
|
||||||
- Make the receive buffer dynamic??
|
- Make the receive buffer dynamic??
|
||||||
- Change some of the packet size issues to fatal errors.
|
- Change some of the packet size issues to fatal errors.
|
||||||
- Code cleanups.
|
- Code cleanups.
|
||||||
|
|||||||
2
mcrcon.1
2
mcrcon.1
@ -17,7 +17,7 @@ It is well suited for remote administration and server maintenance scripts.
|
|||||||
.IP -h
|
.IP -h
|
||||||
Print usage
|
Print usage
|
||||||
.IP -H
|
.IP -H
|
||||||
Server address
|
Server address (default is localhost)
|
||||||
.IP -P
|
.IP -P
|
||||||
Port (default is 25575)
|
Port (default is 25575)
|
||||||
.IP -p
|
.IP -p
|
||||||
|
|||||||
13
mcrcon.c
13
mcrcon.c
@ -147,7 +147,10 @@ int main(int argc, char *argv[])
|
|||||||
if (!port)
|
if (!port)
|
||||||
port = "25575";
|
port = "25575";
|
||||||
|
|
||||||
if(argc < 2 && host == NULL && pass == NULL)
|
if (!host)
|
||||||
|
host = "localhost";
|
||||||
|
|
||||||
|
if(argc < 1 && pass == NULL)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
// default getopt error handler enabled
|
// default getopt error handler enabled
|
||||||
@ -185,12 +188,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (host == NULL)
|
|
||||||
{
|
|
||||||
fputs("Host not defined (-H flag). Try 'mcrcon -h' or 'man mcrcon' for more information.\n\n", stdout);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pass == NULL)
|
if (pass == NULL)
|
||||||
{
|
{
|
||||||
fputs("Password not defined (-p flag). Try 'mcrcon -h' 'man mcrcon' for more information.\n\n", stdout);
|
fputs("Password not defined (-p flag). Try 'mcrcon -h' 'man mcrcon' for more information.\n\n", stdout);
|
||||||
@ -240,7 +237,7 @@ void usage(void)
|
|||||||
"Sends rcon commands to Minecraft server.\n\n"
|
"Sends rcon commands to Minecraft server.\n\n"
|
||||||
"Option:\n"
|
"Option:\n"
|
||||||
" -h\t\tPrint usage\n"
|
" -h\t\tPrint usage\n"
|
||||||
" -H\t\tServer address\n"
|
" -H\t\tServer address (default is localhost)\n"
|
||||||
" -P\t\tPort (default is 25575)\n"
|
" -P\t\tPort (default is 25575)\n"
|
||||||
" -p\t\tRcon password\n"
|
" -p\t\tRcon password\n"
|
||||||
" -t\t\tInteractive terminal mode\n"
|
" -t\t\tInteractive terminal mode\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user