mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-06 08:53:27 +02:00
Update mesh_bot.py
This commit is contained in:
+1
-3
@@ -526,12 +526,10 @@ def handle_history(nodeid, deviceID, lheard=False):
|
||||
nodeName = get_name_from_number(cmdHistorySorted[i]['nodeID'], 'short', deviceID)
|
||||
if not any(d[0] == nodeName for d in buffer):
|
||||
buffer.append((nodeName, prettyTime))
|
||||
|
||||
# truncate buffer list to 4 users
|
||||
if len(buffer) > 4:
|
||||
buffer = buffer[-4:]
|
||||
|
||||
# format the buffer list into a string for display only return the last 4 users
|
||||
# create the message from the buffer list
|
||||
for i in range(0, len(buffer)):
|
||||
msg += f"{buffer[i][0]} seen {buffer[i][1]} ago. "
|
||||
|
||||
|
||||
Reference in New Issue
Block a user