Release v3.0.0

- Update gamedig from 4.0.6 to 5.1.0 (breaking change! various server types renamed)
- Fixed autocomplete for server types and now selecting a server type auto fills the query port with the default
- Added strip colors gamedig option
- Added address gamedig option to skip DNS resolution
- Added github funding links
This commit is contained in:
2024-08-05 09:21:24 -06:00
parent 5bacdb685d
commit 035341c386
6 changed files with 162 additions and 615 deletions

View File

@@ -6,6 +6,7 @@
name: { value: '' },
server_type: { value: '' },
host: { value: '' },
address: { value: '' },
port: { value: '' },
halt_if: { value: '' },
max_attempts: { value: '' },
@@ -14,6 +15,7 @@
given_port_only: { value: '' },
ip_family: { value: '0' },
debug: { value: '' },
strip_colors: { type: "checkbox", value: true },
request_rules: { value: '' },
output_options: { value: '' }
},
@@ -26,14 +28,19 @@
return this.name;
}
if(this.host) {
return (this.server_type ? this.server_type : 'Query') + ': ' + this.host + (this.port ? ":" + this.port : '');
if(this.host || this.address) {
return (this.server_type ? this.server_type : 'Query') + ': ' + (this.host || this.address) + (this.port ? ":" + this.port : '');
}
return 'Query Game Server';
},
oneditprepare: function() {
let server_types = null;
console.log("THIS:", this);
if(typeof this.strip_colors === "undefined") {
this.strip_colors = true;
$("#node-input-strip_colors").prop('checked', true);
}
$.getJSON('/gamedig/types', function(data) {
if(data.result !== 'ok' || !data.hasOwnProperty("server_types"))
@@ -54,7 +61,7 @@
if (
v.name.toLowerCase().indexOf(val.toLowerCase()) > -1 ||
v.type.toLowerCase().indexOf(val.toLowerCase()) > -1 ||
v.protocol.toLowerCase().indexOf(val.toLowerCase()) > -1
v.options.protocol.toLowerCase().indexOf(val.toLowerCase()) > -1
) {
matches.push({
value: v.type,
@@ -65,6 +72,20 @@
});
return matches;
}
}).on('change', function () {
if(!server_types) return;
let val = $(this).val();
server_types.forEach(server_type => {
if(server_type['type'] !== val) return;
let query_port = server_type.options.port_query || server_type.options.port || null;
if(query_port && server_type.options.port_query_offset) {
query_port += server_type.options.port_query_offset;
}
$("#node-input-port").val(query_port);
});
});
}
});
@@ -101,6 +122,14 @@
Host without port. Uses <code>msg.host</code> if left blank.
</div>
<div class="form-row">
<label for="node-input-address"><i class="fa fa-server"></i> Address</label>
<input type="text" id="node-input-address" placeholder="msg.address" />
</div>
<div style="margin-left: 105px;width: 50%;margin-bottom: 10px;margin-top: -10px;">
Override the IP address of the server skipping DNS resolution. When set, host will not be resolved, instead address will be connected to. However, some protocols still use host for other reasons e.g. as part of the query. Uses <code>msg.address</code> if left blank.
</div>
<div class="form-row">
<label for="node-input-port"><i class="fa fa-server"></i> Port</label>
<input type="text" id="node-input-port" placeholder="msg.port" />
@@ -171,6 +200,18 @@
</span>
</div>
<div class="form-row">
<label for="node-input-strip_colors" style="vertical-align: top"><i class="fa fa-server"></i> Strip colors</label>
<div style="width: 50%;display: inline-block;">
<input
type="checkbox"
id="node-input-strip_colors"
style="width: auto; vertical-align: top"
/>
for protocols that strips colors: unreal2, savage2, quake3, nadeo, gamespy2, doom3, armagetron.
</div>
</div>
<div class="form-row">
<label for="node-input-request_rules" style="vertical-align: top"><i class="fa fa-server"></i> Request rules</label>
<div style="width: 50%;display: inline-block;">
@@ -225,6 +266,11 @@
</dt>
<dd>Server IP/Hostname. Ignored if configured on the node.</dd>
<dt class="optional">
msg.address <span class="property-type">string | null</span>
</dt>
<dd>Override the IP address of the server skipping DNS resolution. When set, host will not be resolved, instead address will be connected to. However, some protocols still use host for other reasons e.g. as part of the query.</dd>
<dt class="optional">
msg.port <span class="property-type">integer | null</span>
</dt>
@@ -296,7 +342,12 @@
<dt>
msg.host <span class="property-type">string</span>
</dt>
<dd>Server IP/Hostname. Ignored if configured on the node.</dd>
<dd>Server IP/Hostname.</dd>
<dt>
msg.address <span class="property-type">string</span>
</dt>
<dd>Server address used to query.</dd>
<dt>
msg.port <span class="property-type">integer</span>