Skip to content

Commit

Permalink
Hmm...
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed May 1, 2016
1 parent c5de406 commit 5693589
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 32 deletions.
1 change: 1 addition & 0 deletions DEBUG.PROXY.BAT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font="DejaVu Sans Mono" -o FontHeight=10 -o CursorType=2 -o CursorBlinks=0 -h error -t "iServer Debug Console" -w max bin\x\proxy.bat --enable-ansi %*
1 change: 1 addition & 0 deletions DEBUG.TTE.BAT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font="DejaVu Sans Mono" -o FontHeight=10 -o CursorType=2 -o CursorBlinks=0 -h error -t "iServer Debug Console" -w max bin\x\server.bat --enable-ansi %*
60 changes: 60 additions & 0 deletions bin/x/proxy.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
@echo off
TITLE iServer Proxy v1.09b
echo INITIALIZING...
ping 9.9.9.9 -n 2.5>nul
echo LOADING SRC\PROXY\MAIN.SCI
echo LOADING SRC\PROXY\TASKLISTENER\MAIN.SCI
ping 9.9.9.9 -n 3>nul
echo LOADING SOURCES...
ping 6.7.8.9 -n 1>nul
echo DONE!
echo.
if exist HOST_1 (
echo Loading hosts...
) else (
echo PLEASE SET UP HOSTS
type /p HOST1_IP="Host 1 IP: "
type /p HOST1_PORT="Host 1 Port: "
type /p HOST2_IP="Host 2 IP: "
type /p HOST2_PORT="Host 2 Port: "
type /p HOST3_IP="Host 3 IP: "
type /p HOST3_PORT="Host 3 Port: "
type /p HOST4_IP="Host 4 IP: "
type /p HOST4_PORT="Host 4 Port: "
type /p HOST5_IP="Host 5 IP: "
type /p HOST5_PORT="Host 5 Port: "
echo ALL LOCATIONS:
echo "%HOST1_IP%:%HOST1_PORT%"
echo "%HOST2_IP%:%HOST2_PORT%"
echo "%HOST3_IP%:%HOST3_PORT%"
echo "%HOST4_IP%:%HOST4_PORT%"
echo "%HOST5_IP%:%HOST5_PORT%"
echo.
echo Writing all data to files...
if exist data\ (
) else (
echo Creating directory...
mkdir data
)
echo %HOST1_IP%:%HOST1_PORT%>HOST_1
echo %HOST2_IP%:%HOST2_PORT%>HOST_2
echo %HOST3_IP%:%HOST3_PORT%>HOST_3
echo %HOST4_IP%:%HOST4_PORT%>HOST_4
echo %HOST5_IP%:%HOST5_PORT%>HOST_5
echo.
)
echo Checking hosts...
echo.
echo Checking 1...
ping %HOST1_IP%:%HOST1_PORT%
echo Checking 2...
ping %HOST2_IP%:%HOST2_PORT%
echo Checking 3...
ping %HOST3_IP%:%HOST3_PORT%
echo Checking 4...
ping %HOST4_IP%:%HOST4_PORT%
echo Checking 5...
ping %HOST5_IP%:%HOST5_PORT%
echo.
echo Done!
pause
61 changes: 61 additions & 0 deletions bin/x/server.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@echo off
TITLE iServer Beta Build #13
echo [INFO] Starting Server on 127.0.0.1:19132
echo [INFO] Loading assets...
ping 192.0.2.2 -n 5 > nul
echo [NOTICE] Level saving not yet implented. Neither is player data saving, closing the server delets everything.
if exist server.conf (
echo [INFO] Loading server.conf files...

) else (
echo [CRITICAL] server.conf not found, generating new key...> server.motd
)
if exist proxySetup.conf (
echo [INFO] Loading proxySetup.conf message...

) else (
echo [CRITICAL] proxySetup.conf not found, generating new key...> join.msg
)
echo [INFO] Loading plugins...

if exist task.sci (
echo [INFO] Loading packaged task file...

) else (
echo [WARNING] Non-packaged server installation detected. Not suitable for a production server.

)
echo [INFO] Loading plugins...

echo ----------[ Addon Manager ]-----------
echo Loading addons...
if exist addons\MCPETransfer.jfs (
if exist addons\patches\mct.patch (
echo [MCPETransfer] MCPETransfer loaded and ready!
) else (
echo [CRITICAL] bootstrapProcess failed for loading addon process of MCPETransfer
echo [MCPETransfer] An error ocurred and the process canceled
)

) else (
echo No addons to load!
)
echo ----------[ Addon Manager ]-----------
echo [THREAD] ThreadWork Finished!
goto :loop
:loop
set /p CMD="> "
if %CMD% == help (
echo --- Command Help ---
echo help - Shows a list of commands.
echo sudo - Initiates 'sudo' mode [EXPIERIMENTAL]
echo [NOTICE] Commands have not yet been implented!
) else if %CMD% == sudo (
echo [ALERT] Attempting to 'sudo' a command // Doesn't seem to be working.
type /p SUDO_CMD="$ "
ping 127.8.0.1 -n 1>nul
%SUDO_CMD%
) else (
echo [INFO] Failed to execute command
)
goto :loop
40 changes: 21 additions & 19 deletions proxy.bat
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
@echo off
TITLE iServer Proxy v1.09b
echo INITIALIZING...
pine 9.9.9.9 -n 2.5>nul
ping 9.9.9.9 -n 2.5>nul
echo LOADING SRC\PROXY\MAIN.SCI
echo LOADING SRC\PROXY\TASKLISTENER\MAIN.SCI
ping 9.9.9.9 -n 3>nul
echo LOADING SOURCES...
ping 6.7.8.9 -n 1>nul
ping 6.7.8.9 -n 2>nul
echo DONE!
echo.
echo PLEASE SET UP HOSTS
pause
type /p HOST1_IP="Host 1 IP: "
type /p HOST1_PORT="Host 1 Port: "
type /p HOST2_IP="Host 2 IP: "
type /p HOST2_PORT="Host 2 Port: "
type /p HOST3_IP="Host 3 IP: "
type /p HOST3_PORT="Host 3 Port: "
type /p HOST4_IP="Host 4 IP: "
type /p HOST4_PORT="Host 4 Port: "
type /p HOST5_IP="Host 5 IP: "
type /p HOST5_PORT="Host 5 Port: "
pause
echo Host1
set /p HOST1_IP=IP:
set /p HOST1_PORT=Port:
echo Host2
set /p HOST2_IP=IP:
set /p HOST2_PORT=Port:
echo Host3
set /p HOST3_IP=IP:
set /p HOST3_PORT=Port:
echo Host4
set /p HOST4_IP=IP:
set /p HOST4_PORT=Port:
echo Host5
set /p HOST5_IP=IP:
set /p HOST5_PORT=Port:
echo ALL LOCATIONS:
echo "%HOST1_IP%:%HOST1_PORT%"
echo "%HOST2_IP%:%HOST2_PORT%"
Expand All @@ -30,16 +33,15 @@ echo "%HOST4_IP%:%HOST4_PORT%"
echo "%HOST5_IP%:%HOST5_PORT%"
echo.
echo Writing all data to files...
if exist data\ (
) else (
echo Creating directory...
mkdir data
)
cd data
cd proxy
echo %HOST1_IP%:%HOST1_PORT%>HOST_1
echo %HOST2_IP%:%HOST2_PORT%>HOST_2
echo %HOST3_IP%:%HOST3_PORT%>HOST_3
echo %HOST4_IP%:%HOST4_PORT%>HOST_4
echo %HOST5_IP%:%HOST5_PORT%>HOST_5
cd ..
cd ..
echo.
echo Checking hosts...
echo.
Expand Down
56 changes: 43 additions & 13 deletions server.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
@echo off
if not exist data\server\wizard (
echo.
echo Welcome to iServer!
echo Website: https://github.com/iServer-Project
echo.
echo.
goto :setup
)
TITLE iServer Beta Build #13
echo [INFO] Starting Server on 127.0.0.1:19132
echo [INFO] Loading assets...
Expand Down Expand Up @@ -43,19 +51,41 @@ if exist addons\MCPETransfer.jfs (
echo ----------[ Addon Manager ]-----------
echo [THREAD] ThreadWork Finished!
goto :loop
goto :loop2
:loop
set /p CMD="> "
if %CMD% == help (
echo --- Command Help ---
echo help - Shows a list of commands.
echo sudo - Initiates 'sudo' mode [EXPIERIMENTAL]
echo [NOTICE] Commands have not yet been implented!
) else if %CMD% == sudo (
echo [ALERT] Attempting to 'sudo' a command // Doesn't seem to be working.
type /p SUDO_CMD="$ "
ping 127.8.0.1 -n 1>nul
%SUDO_CMD%
) else (
echo [INFO] Failed to execute command
if %CMD% == "help" (
echo [INFO] Commands are not implented yet!
)
goto :loop
:loop2
set %memory% == %random% / 20
cd data
cd server
type 2 == %RAM%
TITLE iServer [1 THREADS][%memory% / %RAM%]
ping 9.8.7.6:9076 -n 2.0%random%>nul
:setup
echo Welcome to iServer!
echo There will be a quick set-up wizard. Would you like to skip it? [y/N]
set /p tmp=""
if %tmp% == "y" (
cd data
cd server
echo ~!@#$%^&*()_+{}|:"<>?`1234567890-=[]\;',./qwertyuiopasdfghjklzxcvbnm > WIZARD
echo %SKIP_WIZARD%==TRUE >> WIZARD
exit
)
echo [*] What is the maximum amount of players aloud? [20]
set /p tmp=""
if %tmp% == "" (
set %tmp% == "20"
echo %tmp% > 1
)
echo [*] RAM is the max amount of memory iServer will use. What value would you like to assign to RAM? [128]
set /p tmp=""
if %tmp% == "" (
set %tmp% == "128"
echo %tmp% > 2
)
goto :loop
)

0 comments on commit 5693589

Please sign in to comment.