ui for chat options

This commit is contained in:
Zlatin Balevsky
2019-11-12 15:31:20 +00:00
parent cec3c1bc0f
commit beef4af329
6 changed files with 49 additions and 3 deletions

View File

@@ -372,8 +372,6 @@ public class Core {
connectionEstablisher.start()
hostCache.waitForLoad()
updateClient.start()
if (muOptions.startChatServer)
chatServer.start()
}
public void shutdown() {

View File

@@ -33,6 +33,7 @@ class MuWireSettings {
boolean browseFiles
boolean startChatServer
int maxChatConnections
boolean advertiseChat
Set<String> watchedDirectories
float downloadSequentialRatio
int hostClearInterval, hostHopelessInterval, hostRejectInterval
@@ -83,7 +84,8 @@ class MuWireSettings {
uploadSlotsPerUser = Integer.valueOf(props.getProperty("uploadSlotsPerUser","-1"))
startChatServer = Boolean.valueOf(props.getProperty("startChatServer","false"))
maxChatConnections = Integer.valueOf(props.get("maxChatConnections", "-1"))
advertiseChat = Boolean.valueOf(props.getProperty("advertiseChat","true"))
watchedDirectories = DataUtil.readEncodedSet(props, "watchedDirectories")
watchedKeywords = DataUtil.readEncodedSet(props, "watchedKeywords")
watchedRegexes = DataUtil.readEncodedSet(props, "watchedRegexes")
@@ -133,6 +135,7 @@ class MuWireSettings {
props.setProperty("uploadSlotsPerUser", String.valueOf(uploadSlotsPerUser))
props.setProperty("startChatServer", String.valueOf(startChatServer))
props.setProperty("maxChatConnectios", String.valueOf(maxChatConnections))
props.setProperty("advertiseChat", String.valueOf(advertiseChat))
DataUtil.writeEncodedSet(watchedDirectories, "watchedDirectories", props)
DataUtil.writeEncodedSet(watchedKeywords, "watchedKeywords", props)