diff --git a/modules/bbstools.py b/modules/bbstools.py index 87231b0..7540385 100644 --- a/modules/bbstools.py +++ b/modules/bbstools.py @@ -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") diff --git a/modules/system.py b/modules/system.py index ef280f4..0c1c59a 100644 --- a/modules/system.py +++ b/modules/system.py @@ -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