From 528d145ff3746fd749e3d4af1f8e5e66a5a2d392 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Tue, 18 Jun 2024 22:00:32 -0700 Subject: [PATCH] Update mesh-bot.py --- mesh-bot.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mesh-bot.py b/mesh-bot.py index d2cde92..b224942 100644 --- a/mesh-bot.py +++ b/mesh-bot.py @@ -173,9 +173,11 @@ def get_node_list(): if interface.nodes: for node in interface.nodes.values(): - #limit list to the last 5 nodes - node_list.append(get_name_from_number(node['num'])) - if len(node_list) > 4: + #limit list to the last 5 nodes, and ignore own node at 0 + if node['num'] != 0: + node_list.append(get_name_from_number(node['num'])) + + if len(node_list) > 5: break return node_list