mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-06-23 19:41:34 +02:00
enhance bbsDM
enable a new 'API' to inject into the pkl file for DM's also see https://github.com/SpudGunMan/meshing-around/commit/2d44faac98bb977d9b3b9f840ca4dfbec71af3dc
This commit is contained in:
+5
-1
@@ -118,7 +118,11 @@ def load_bbsdm():
|
||||
# load the bbs messages from the database file
|
||||
try:
|
||||
with open('data/bbsdm.pkl', 'rb') as f:
|
||||
bbs_dm = pickle.load(f)
|
||||
new_bbs_dm = pickle.load(f)
|
||||
if isinstance(new_bbs_dm, list):
|
||||
for msg in new_bbs_dm:
|
||||
if msg not in bbs_dm:
|
||||
bbs_dm.append(msg)
|
||||
except:
|
||||
bbs_dm = [[1234567890, "Message", 1234567890]]
|
||||
logger.debug("System: Creating new data/bbsdm.pkl")
|
||||
|
||||
@@ -1347,6 +1347,10 @@ async def watchdog():
|
||||
# check for noisy telemetry
|
||||
if noisyNodeLogging:
|
||||
noisyTelemetryCheck()
|
||||
|
||||
# check the load_bbsdm flag to reload the BBS messages from disk
|
||||
if bbs_enabled:
|
||||
load_bbsdm()
|
||||
|
||||
def exit_handler():
|
||||
# Close the interface and save the BBS messages
|
||||
|
||||
Reference in New Issue
Block a user