mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
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:
@@ -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).
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user