Added Log Targets and misc props from servercommon

This commit is contained in:
Cekis
2021-03-29 23:34:48 -07:00
parent b9eb58e2ee
commit 1651a1f245
2 changed files with 249 additions and 7 deletions
+210 -6
View File
@@ -569,6 +569,9 @@ public class SwgConfiguration {
private boolean validateClientVersion;
private boolean validateStationKey;
private boolean easyExternalAccess;
private boolean useExternalAuth;
private String externalAuthURL;
private String externalAuthSecretKey;
LoginServer() {}
@@ -576,9 +579,36 @@ public class SwgConfiguration {
String output = "\nvalidateClientVersion=" + validateClientVersion;
output += "\nvalidateStationKey=" + validateStationKey;
output += "\neasyExternalAccess=" + easyExternalAccess;
output += "\nuseExternalAuth=" + useExternalAuth;
output += "\nexternalAuthURL=" + externalAuthURL;
output += "\nexternalAuthSecretKey=" + externalAuthSecretKey;
return output + "\n\n";
}
public boolean isUseExternalAuth() {
return useExternalAuth;
}
public void setUseExternalAuth(boolean useExternalAuth) {
this.useExternalAuth = useExternalAuth;
}
public String getExternalAuthURL() {
return externalAuthURL;
}
public void setExternalAuthURL(String externalAuthURL) {
this.externalAuthURL = externalAuthURL;
}
public String getExternalAuthSecretKey() {
return externalAuthSecretKey;
}
public void setExternalAuthSecretKey(String externalAuthSecretKey) {
this.externalAuthSecretKey = externalAuthSecretKey;
}
public boolean isValidateClientVersion() {
return validateClientVersion;
}
@@ -712,36 +742,150 @@ public class SwgConfiguration {
}
public static class SharedLog {
private String logTarget;
private List<LogTarget> logTargets;
SharedLog() {}
public String toString() {
String output = "\nlogTarget=" + logTarget;
String output = "";
for(LogTarget target : logTargets) {
output += "\nlogTarget=" + target.toString();
}
return output + "\n\n";
}
public String getLogTarget() {
return logTarget;
public static class LogTarget {
private String type;
private String path;
private List<LogTargetFilter> filters;
LogTarget() {}
public String toString() {
StringBuilder output = new StringBuilder(type + ":" + path);
if(filters != null) {
int filterSize = filters.size();
output.append("{");
for (int i = 0; i < filterSize; i++) {
if (i > 0) output.append(":");
output.append(filters.get(i).toString());
}
output.append("}");
}
return output.toString();
}
public static class LogTargetFilter {
private String type;
private String name;
private boolean filtered;
LogTargetFilter() {}
public String toString() {
return getTypeValue() + getFilteredValue() + name;
}
private String getTypeValue() {
switch(getType()) {
case "channel":
return "c";
case "data":
return "d";
case "process":
return "p";
}
return null;
}
private String getFilteredValue() {
if(isFiltered()) return "-";
return "+";
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isFiltered() {
return filtered;
}
public void setFiltered(boolean filtered) {
this.filtered = filtered;
}
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public List<LogTargetFilter> getFilters() {
return filters;
}
public void setFilters(List<LogTargetFilter> filters) {
this.filters = filters;
}
}
public void setLogTarget(String logTarget) {
this.logTarget = logTarget;
public List<LogTarget> getLogTargets() {
return logTargets;
}
public void setLogTargets(List<LogTarget> logTargets) {
this.logTargets = logTargets;
}
}
public static class SharedNetwork {
private int oldestUnacknowledgedTimeout;
private int noDataTimeout;
private List<Integer> reservedPort;
SharedNetwork() {}
public String toString() {
String output = "\noldestUnacknowledgedTimeout=" + oldestUnacknowledgedTimeout;
output += "\nnoDataTimeout=" + noDataTimeout;
for(Integer port : reservedPort) {
output += "\nreservedPort=" + port.toString();
}
return output + "\n\n";
}
public List<Integer> getReservedPort() {
return reservedPort;
}
public void setReservedPort(List<Integer> reservedPort) {
this.reservedPort = reservedPort;
}
public int getOldestUnacknowledgedTimeout() {
return oldestUnacknowledgedTimeout;
}
@@ -1000,6 +1144,7 @@ public class SwgConfiguration {
private int maxReimburseAmount;
private int maxSocketSkillModBonus;
private int maxTotalAttribBonus;
private int minRespecIntervalInSeconds;
private boolean mountsEnabled;
private boolean nameValidationAcceptAll;
private boolean newbieTutorialEnabled;
@@ -1007,12 +1152,17 @@ public class SwgConfiguration {
private int pvpGuildWarCoolDownPeriodTimeMs;
private boolean reportAiWarnings;
private int resourceTimeScale;
private int respecDurationAllowedInSeconds;
private RareLoot rls;
private String scriptPath;
private int secondsPerResourceTick;
private boolean sendBreadcrumbs;
private boolean shipsEnabled;
private SpaceGcw spaceGcw;
private boolean spawnAllResources;
private float startX;
private float startY;
private float startZ;
private int unclaimedAuctionItemDestroyTimeSec;
private int debugMode;
private String serverLoadLevel;
@@ -1136,6 +1286,7 @@ public class SwgConfiguration {
output += "\nmaxReimburseAmount=" + maxReimburseAmount;
output += "\nmaxSocketSkillModBonus=" + maxSocketSkillModBonus;
output += "\nmaxTotalAttribBonus=" + maxTotalAttribBonus;
output += "\nminRespecIntervalInSeconds=" + minRespecIntervalInSeconds;
output += "\nmountsEnabled=" + mountsEnabled;
output += "\nnameValidationAcceptAll=" + nameValidationAcceptAll;
output += "\nnewbieTutorialEnabled=" + newbieTutorialEnabled;
@@ -1143,12 +1294,17 @@ public class SwgConfiguration {
output += "\npvpGuildWarCoolDownPeriodTimeMs=" + pvpGuildWarCoolDownPeriodTimeMs;
output += "\nreportAiWarnings=" + reportAiWarnings;
output += "\nresourceTimeScale=" + resourceTimeScale;
output += "\nrespecDurationAllowedInSeconds=" + respecDurationAllowedInSeconds;
output += rls.toString();
output += "\nscriptPath=" + scriptPath;
output += "\nsecondsPerResourceTick=" + secondsPerResourceTick;
output += "\nsendBreadcrumbs=" + sendBreadcrumbs;
output += "\nshipsEnabled=" + shipsEnabled;
output += spaceGcw.toString();
output += "\nspawnAllResources=" + spawnAllResources;
output += "\nstartX=" + startX;
output += "\nstartY=" + startY;
output += "\nstartZ=" + startZ;
output += "\ndebugMode=" + debugMode;
output += "\nserverLoadLevel=" + serverLoadLevel;
output += "\nsuiListLimit=" + suiListLimit;
@@ -1640,6 +1796,54 @@ public class SwgConfiguration {
this.rls = rls;
}
public int getMinRespecIntervalInSeconds() {
return minRespecIntervalInSeconds;
}
public void setMinRespecIntervalInSeconds(int minRespecIntervalInSeconds) {
this.minRespecIntervalInSeconds = minRespecIntervalInSeconds;
}
public int getRespecDurationAllowedInSeconds() {
return respecDurationAllowedInSeconds;
}
public void setRespecDurationAllowedInSeconds(int respecDurationAllowedInSeconds) {
this.respecDurationAllowedInSeconds = respecDurationAllowedInSeconds;
}
public String getScriptPath() {
return scriptPath;
}
public void setScriptPath(String scriptPath) {
this.scriptPath = scriptPath;
}
public float getStartX() {
return startX;
}
public void setStartX(float startX) {
this.startX = startX;
}
public float getStartY() {
return startY;
}
public void setStartY(float startY) {
this.startY = startY;
}
public float getStartZ() {
return startZ;
}
public void setStartZ(float startZ) {
this.startZ = startZ;
}
public boolean isEnableOneYearAnniversary() {
return enableOneYearAnniversary;
}