mirror of
https://github.com/Tiiffi/mcrcon.git
synced 2025-10-28 11:51:08 -04:00
Add windows batch scripts
This commit is contained in:
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2012-2021, Tiiffi <tiiffi at gmail>
|
||||
Copyright (c) 2012-2024, Tiiffi <tiiffi at gmail>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
31
create_shortcut.bat
Normal file
31
create_shortcut.bat
Normal file
@ -0,0 +1,31 @@
|
||||
@echo off
|
||||
@cls
|
||||
|
||||
@set /p host="Enter host (default: "127.0.0.1"): "
|
||||
@if "%host%"=="" set host=127.0.0.1
|
||||
|
||||
@set /p port="Enter port (default: 25575): "
|
||||
@if "%port%"=="" set port=25575
|
||||
|
||||
@set /p passwd="Enter password: "
|
||||
@if "%passwd%"=="" set passwd=
|
||||
|
||||
set name=connect_%host%-%port%
|
||||
|
||||
@set /p name="Enter shortcut name (default: "%name%.bat"): "
|
||||
@if "%name%"=="" set name=connect_%host%-%port%
|
||||
|
||||
set command=@mcrcon.exe -t -H %host% -P %port% -p %passwd%
|
||||
|
||||
@echo %command% >> %name%.bat
|
||||
@echo.
|
||||
@echo Command: "%command%"
|
||||
@echo.
|
||||
@echo Shortcut "%name%.bat" created!
|
||||
@echo.
|
||||
|
||||
@set "host="
|
||||
@set "port="
|
||||
@set "passwd="
|
||||
|
||||
@pause
|
||||
29
launch.bat
Normal file
29
launch.bat
Normal file
@ -0,0 +1,29 @@
|
||||
@echo off
|
||||
@cls
|
||||
|
||||
@if not exist mcrcon.exe (
|
||||
@echo ERROR: Cannot find "mcrcon.exe". Bailing out!
|
||||
@echo.
|
||||
@pause
|
||||
@exit
|
||||
)
|
||||
|
||||
@set /p host="Enter host (default: 127.0.0.1): "
|
||||
@if "%host%"=="" set host=127.0.0.1
|
||||
|
||||
@set /p port="Enter port (default: 25575): "
|
||||
@if "%port%"=="" set port=25575
|
||||
|
||||
@set /p passwd="Enter password: "
|
||||
@if "%passwd%"=="" set passwd=
|
||||
|
||||
@echo.
|
||||
mcrcon.exe -t -H %host% -P %port% -p %passwd%
|
||||
@echo.
|
||||
|
||||
@set "host="
|
||||
@set "port="
|
||||
@set "passwd="
|
||||
|
||||
@pause
|
||||
|
||||
Reference in New Issue
Block a user