Some database and config updates. Trying to adjust the base profile menubar.

This commit is contained in:
Michael Woods
2025-12-27 15:36:33 -05:00
parent ea60fc2286
commit a206e82874
5 changed files with 32 additions and 10 deletions

View File

@@ -73,13 +73,14 @@ class Server:
if 'config' not in conn.root():
logging.debug("no config, writing blank default config")
conn.root.config = PersistentMapping(deepcopy(default_server_config))
conn.root.server_callsign = self.callsign
conn.root.config['blacklist'] = PersistentList()
for key in ['motd', 'operator']:
if key not in conn.root.config:
conn.root.config[key] = ""
if 'server_name' not in conn.root.config:
conn.root.config.server_name = default_server_name
logging.debug(f"Setting server callsign in db to: {self.callsign}")
conn.root.server_callsign = self.callsign
for key in ['motd', 'operator']:
if key not in conn.root.config:
conn.root.config[key] = ""
if 'server_name' not in conn.root.config:
conn.root.config['server_name'] = default_server_name
if 'SYSTEM' not in conn.root.config['blacklist']:
logging.debug("Adding 'SYSTEM' to blacklist in case someone feels like violating FCC rules.")
conn.root.config['blacklist'].append('SYSTEM')