fix(bot): !hops / {hops} say 'known route' as !path does, a route followed by ':' is found, {rssi} among the L2's placeholders

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-26 22:40:30 +01:00
co-authored by Claude Opus 5.5
parent c1af501cc4
commit e8553d276d
5 changed files with 14 additions and 10 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ static void logLine(const BotLogEntry& e, int8_t tz, char* out, size_t n) {
e.who[0] ? e.who : "?", e.req, e.reply);
}
static const char* const REPLY_PLACEHOLDERS[] = { "{name}", "{hops}", "{path}", "{snr}", "{loc}", "{time}", "{batt}" };
static const char* const REPLY_PLACEHOLDERS[] = { "{name}", "{hops}", "{path}", "{snr}", "{loc}", "{time}", "{batt}", "{rssi}" };
static const int REPLY_PLACEHOLDER_COUNT = sizeof(REPLY_PLACEHOLDERS) / sizeof(REPLY_PLACEHOLDERS[0]);
// Shown value of a text row ("(none)", "(any msg)" for the "*" trigger).
+1 -1
View File
@@ -47,7 +47,7 @@ public:
for (int i = 0; i < gw; i++) if (!isdigit((unsigned char)q[i])) decimal = false;
k++;
q += gw;
if (*q != ':') break;
if (*q != ':' || !isxdigit((unsigned char)q[1])) break; // "3f:a1: 2 hops": that ':' is the sentence's
q++;
}
if (!ok || k < 2) continue;