IRC: add the firmware version to the CTCP VERSION reply

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk
This commit is contained in:
2026-10-09 19:01:36 +02:00
co-authored by Claude Sonnet 5.5
parent 5bec851a1a
commit e707a5f2d4
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -4,6 +4,7 @@
#include <cctype>
#include "base64.h"
#include "version.h"
namespace roro {
@@ -284,7 +285,7 @@ void IrcSession::onPrivmsg(const IrcMessage& m, int64_t utc, bool notice) {
action = true;
text = rest;
} else {
if (verb == "VERSION" && !notice) send(std::string("NOTICE ") + from + " :" + kCtcp + "VERSION roro9stack" + kCtcp);
if (verb == "VERSION" && !notice) send(std::string("NOTICE ") + from + " :" + kCtcp + "VERSION " + kProductName + " " + versionString() + kCtcp);
return;
}
}
+2 -1
View File
@@ -5,6 +5,7 @@
#include "../memory_store.h"
#include "irc_session.h"
#include "version.h"
using namespace roro;
@@ -326,7 +327,7 @@ void test_action_and_ctcp_version() {
f.take();
f.recv(":alice!u@h PRIVMSG roro :\x01VERSION\x01");
f.take();
TEST_ASSERT_TRUE(f.sent("NOTICE alice :\x01VERSION roro9stack\x01"));
TEST_ASSERT_TRUE(f.sent(std::string("NOTICE alice :\x01VERSION roro9stack ") + versionString() + "\x01"));
}
void test_topic_is_kept() {