mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Set default prefix and suffix to all server names
This commit is contained in:
parent
93595dfdf0
commit
fac82611dc
@ -7,5 +7,7 @@ module.exports = {
|
||||
auth: { // If both username and password is set, HTTP Basic Auth will be used
|
||||
username: '', // Username for HTTP Basic Auth
|
||||
password: '', // Password for HTTP Basic Auth
|
||||
}
|
||||
},
|
||||
prefix: "", // Prefix to all server names
|
||||
suffix: "", // Suffix to all server names
|
||||
};
|
||||
|
@ -18,6 +18,18 @@ var queryTypes = {
|
||||
ofpresistance: 'operationflashpoint',
|
||||
};
|
||||
|
||||
var createServerTitle = function(title) {
|
||||
if (config.prefix) {
|
||||
title = config.prefix + title;
|
||||
}
|
||||
|
||||
if (config.suffix) {
|
||||
title = title + config.suffix;
|
||||
}
|
||||
|
||||
return title;
|
||||
};
|
||||
|
||||
var Server = function (path, type, options) {
|
||||
this.path = path;
|
||||
this.type = type;
|
||||
@ -69,7 +81,7 @@ Server.prototype.start = function() {
|
||||
disableVoN: this.von ? 0 : 1,
|
||||
game: config.game,
|
||||
headlessClients: this.headless ? ["127.0.0.1"] : null,
|
||||
hostname: this.title,
|
||||
hostname: createServerTitle(this.title),
|
||||
localClient: this.headless ? ["127.0.0.1"] : null,
|
||||
mods: this.mods,
|
||||
password: this.password,
|
||||
|
Loading…
Reference in New Issue
Block a user