This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from Sonoran-Software/release/2.2.1
Release/2.2.1
- Loading branch information
Showing
20 changed files
with
1,077 additions
and
892 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>SonoranCAD Info Page</title> | ||
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | ||
</head> | ||
<body> | ||
<div id="passwordDiv"> | ||
<form> | ||
API Key: <input type="text" id="password" name="password"/><input type="button" id="apisubmit" value="Submit"/> | ||
</form> | ||
</div> | ||
<div id="infoDiv"></div> | ||
<div id="consoleDiv"></div> | ||
|
||
<script type="text/javascript"> | ||
const api = document.getElementById("apisubmit") | ||
api.addEventListener('click', e => { | ||
fetch('/sonorancad/info', { | ||
method: 'post', | ||
body: JSON.stringify({ | ||
password: document.querySelector("#password").value | ||
}) | ||
}).then(res => res.json()).then(res => { | ||
let passDiv = document.getElementById("passwordDiv"); | ||
let infoDiv = document.getElementById("infoDiv"); | ||
let consoleDiv = document.getElementById("consoleDiv"); | ||
if (res.error) { | ||
infoDiv.style.color = '#aa0000'; | ||
infoDiv.innerHTML = "An error occurred."; | ||
infoDiv.style.display == "none"; | ||
} else { | ||
infoDiv.style.color = '#000000'; | ||
infoDiv.style.display == "block"; | ||
// passDiv.style.display == "none"; | ||
infoDiv.innerHTML = res.cadInfo | ||
infoDiv.innerHTML += res.config | ||
consoleDiv.innerHTML = res.console | ||
} | ||
|
||
|
||
}) | ||
}) | ||
</script> | ||
</body> | ||
</html> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
local function getConfig() | ||
local config = LoadResourceFile(GetCurrentResourceName(), "config.json") | ||
return config | ||
end | ||
|
||
SetHttpHandler(function(req, res) | ||
local path = req.path | ||
local method = req.method | ||
|
||
if method == 'POST' and path == '/info' then | ||
req.setDataHandler(function(body) | ||
if not body then | ||
res.send(json.encode({["error"] = "bad request"})) | ||
return | ||
end | ||
local data = json.decode(body) | ||
if not data then | ||
res.send(json.encode({["error"] = "bad request"})) | ||
return | ||
end | ||
if data.password ~= Config.apiKey then | ||
res.send(json.encode({["error"] = "bad request"})) | ||
return | ||
end | ||
res.send(json.encode({ | ||
["status"] = "ok", | ||
["cadInfo"] = string.gsub(dumpInfo(), "\n", "<br />"), | ||
["config"] = string.gsub(getConfig(), "\r\n", "<br />")..string.gsub(json.encode(Config.plugins), "}", "} <br />"), | ||
["console"] = string.gsub(GetConsoleBuffer(), "\n", "<br />") | ||
})) | ||
|
||
end) | ||
else | ||
if path == '/' then | ||
local html = LoadResourceFile(GetCurrentResourceName(), '/core/html/index.html') | ||
res.send(html) | ||
else | ||
res.send("hmm") | ||
end | ||
end | ||
|
||
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
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
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
Submodule forcereg
added at
8fa28a
Submodule kick
added at
4b03ec
Submodule locations
updated
4 files
+3 −1 | README.md | |
+53 −25 | locations/cl_locations.lua | |
+9 −0 | locations/sv_locations.lua | |
+1 −1 | locations/version_locations.json |
Submodule postals
updated
5 files
+4 −2 | README.md | |
+1 −1 | postals/CHANGEMEconfig_postals.lua | |
+2 −2 | postals/README_postals.md | |
+4 −0 | postals/sv_postals.lua | |
+3 −2 | postals/version_postals.json |
Submodule pushevents
updated
2 files
+1 −1 | pushevents/sv_listener_pushevents.js | |
+1 −1 | pushevents/version_pushevents.json |
Submodule wraithv2
updated
3 files
+0 −1 | wraithv2/CHANGEMEconfig_wraithv2.lua | |
+131 −135 | wraithv2/sv_wraithv2.lua | |
+1 −1 | wraithv2/version_wraithv2.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"resource" : "2.2.0" | ||
"resource" : "2.2.1" | ||
} |