From a34162d428a3a99b2bf50693be2297efa47af555 Mon Sep 17 00:00:00 2001 From: ppfeiffer Date: Mon, 16 Feb 2026 17:25:01 +0100 Subject: [PATCH] feat: v0.3.8 - Ping response shows hop count Co-Authored-By: Claude Opus 4.6 --- CHANGELOG.md | 4 ++++ config.yaml | 2 +- meshbot/bot.py | 7 ++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9bd791..7616e25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.3.8] - 2026-02-16 +### Changed +- Ping-Antwort zeigt Hop-Anzahl des anfragenden Nodes (z.B. "Pong ueber 2 Hops!") + ## [0.3.7] - 2026-02-16 ### Added - Weather-Befehl zeigt Ortsnamen via Reverse-Geocoding (Nominatim) diff --git a/config.yaml b/config.yaml index 398066d..ba34a39 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -version: "0.3.7" +version: "0.3.8" bot: name: "MeshDD-Bot" diff --git a/meshbot/bot.py b/meshbot/bot.py index e185544..86a30b3 100644 --- a/meshbot/bot.py +++ b/meshbot/bot.py @@ -262,7 +262,12 @@ class MeshBot: response = None if cmd == f"{prefix}ping": - response = "🏓 Pong!" + hops_str = "" + if from_id: + node = await self.db.get_node(from_id) + if node and node.get("hop_count") is not None: + hops_str = f" ueber {node['hop_count']} Hops" + response = f"🏓 Pong{hops_str}!" elif cmd == f"{prefix}nodes": nodes = await self.db.get_all_nodes()