mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-03-28 17:32:36 +01:00
fixes
This commit is contained in:
@@ -163,7 +163,7 @@ def onReceive(packet, interface):
|
||||
if msg:
|
||||
print(f"{log_timestamp()} System: BBS DM Found: {msg[1]} For: {get_name_from_number(message_from_id)}")
|
||||
message = "Mail: " + msg[1] + " from: " + get_name_from_number(msg[2])
|
||||
bbs_dm.remove(msg)
|
||||
bbs_delete_dm(msg[2], msg[1])
|
||||
send_message(message, channel_number, message_from_id)
|
||||
|
||||
# check for a message packet and process it
|
||||
|
||||
@@ -140,6 +140,19 @@ def bbs_check_dm(toNode):
|
||||
return msg
|
||||
return False
|
||||
|
||||
def bbs_delete_dm(toNode, message):
|
||||
global bbs_dm
|
||||
# delete a message from the bbsdm
|
||||
for msg in bbs_dm:
|
||||
if msg[0] == toNode:
|
||||
# check if the message matches
|
||||
if msg[1] == message:
|
||||
bbs_dm.remove(msg)
|
||||
# save the bbsdb
|
||||
save_bbsdm()
|
||||
return "System: cleared mail for" + str(toNode)
|
||||
return "System: No DM found for node " + str(toNode)
|
||||
|
||||
#initialize the bbsdb's
|
||||
load_bbsdb()
|
||||
load_bbsdm()
|
||||
|
||||
Reference in New Issue
Block a user