Last active
February 8, 2017 11:13
-
-
Save ugai/7959006f5db86bf83be884ac7f882cfb to your computer and use it in GitHub Desktop.
DoW鯖用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo Start | |
call "C:\dow\MyDowUpdate.bat" | |
call "C:\dow\MyLaunchServer.bat" | |
echo end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo Updating DoW Server 1 ... | |
cd "C:\steamcmd" | |
steamcmd.exe +runscript "C:\dow\MyUpdateScript.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo "Days of War Server is Running Please Do Not Close This Window!" | |
@echo off | |
cd "C:\dow\DaysOfWar\Binaries\Win64" | |
:START | |
if exist "update" ( | |
del "update" | |
) | |
if exist "shutdown" ( | |
del "shutdown" | |
exit /b | |
) else ( | |
DaysOfWarServer-Win64-Shipping.exe dow_carentan Port=7777 QueryPort=27015 -LOG | |
goto START | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login anonymous | |
force_install_dir "C:\dow\" | |
app_update 541790 validate | |
quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
if (req.query.host) { | |
var Gamedig = require('gamedig'); | |
Gamedig.query( | |
{ | |
type: 'protocol-valve', | |
host: req.query.host, | |
port: req.query.port | 27015 | |
}, | |
function(state) { | |
if(state.error) { | |
res = { | |
body: "Server is offline" | |
}; | |
} | |
else { | |
console.log(state); | |
res = { | |
//body: "Server is online: " + JSON.stringify(state) | |
body: | |
state.raw.rules.ONM_s + ', ' + | |
state.raw.rules.G_s + ', ' + | |
state.raw.rules.MPN_s + ', ' + | |
state.raw.numplayers + '/' + | |
state.maxplayers + ', ' + | |
state.raw.rules.V_s | |
}; | |
} | |
context.done(null, res); | |
} | |
); | |
} | |
else { | |
res = { | |
status: 400, | |
body: "Please pass a host on the query string" | |
}; | |
context.done(null, res); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment