@@ -37,9 +37,9 @@ def ignore_modifications(self):
37
37
class ServerConfig (IntervalTickPlugin ):
38
38
39
39
CONFIG_MAPPING = {
40
- 'ServerName' : ('Engine' , 'OnlineSubsystemSteam ' , 'ServerName' ),
41
- 'ServerPassword' : ('Engine' , 'OnlineSubsystemSteam ' , 'ServerPassword' ),
42
- 'QueryPort' : ('Engine' , 'OnlineSubsystemSteam ' , 'QueryPort' ),
40
+ 'ServerName' : ('Engine' , 'OnlineSubsystem ' , 'ServerName' ),
41
+ 'ServerPassword' : ('Engine' , 'OnlineSubsystem ' , 'ServerPassword' ),
42
+ 'QueryPort' : ('Engine' , 'OnlineSubsystem ' , 'QueryPort' ),
43
43
'MaxPlayers' : ('Game' , '/Script/Engine.GameSession' , 'MaxPlayers' ),
44
44
'AdminPassword' : ('ServerSettings' , 'ServerSettings' , 'AdminPassword' ),
45
45
'MaxNudity' : ('ServerSettings' , 'ServerSettings' , 'MaxNudity' ),
@@ -51,7 +51,6 @@ class ServerConfig(IntervalTickPlugin):
51
51
'NetServerMaxTickRate' : ('Engine' , '/Script/OnlineSubsystemUtils.IpNetDriver' , 'NetServerMaxTickRate' ),
52
52
}
53
53
54
- DEFAULT_WHITE_LIST = ['Port' ]
55
54
FIVE_MINUTES = 5 * 60
56
55
57
56
def __init__ (self , config ):
@@ -62,6 +61,12 @@ def __init__(self, config):
62
61
def ready (self , * args , ** kwargs ):
63
62
super (ServerConfig , self ).ready (* args , ** kwargs )
64
63
64
+ self .logger .warn (
65
+ "\n =============================================\n "
66
+ "WARNING: ServerConfig plugin has known issues that MAY restart your server infinitely.\n "
67
+ "https://github.com/NullSoldier/serverthrall/issues/37"
68
+ "\n =============================================" )
69
+
65
70
config_paths = self .get_conan_config_paths (self .thrall .conan_config )
66
71
self .handler = OnModifiedHandler (self , config_paths , self .logger )
67
72
@@ -105,9 +110,12 @@ def sync(self):
105
110
original = self .thrall .conan_config .get (group , section , option )
106
111
107
112
if value is not None and value != original :
108
- use_default_config = option in self .DEFAULT_WHITE_LIST
109
- path = self .thrall .conan_config .set (group , section , option , value , use_default_config )
113
+ path = self .thrall .conan_config .set (group , section , option , value , True )
114
+ self .logger .info ('Syncing %s.%s=%s, %s' % (section , option , value , path ))
115
+
116
+ path = self .thrall .conan_config .set (group , section , option , value , False )
110
117
self .logger .info ('Syncing %s.%s=%s, %s' % (section , option , value , path ))
118
+
111
119
changed = True
112
120
113
121
return changed
0 commit comments