diff --git a/lib/irc/src/irc_session.cpp b/lib/irc/src/irc_session.cpp index 4f698ee..a77c619 100644 --- a/lib/irc/src/irc_session.cpp +++ b/lib/irc/src/irc_session.cpp @@ -4,6 +4,7 @@ #include #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; } } diff --git a/test/test_irc_session/test_irc_session.cpp b/test/test_irc_session/test_irc_session.cpp index 8d7563c..aeed853 100644 --- a/test/test_irc_session/test_irc_session.cpp +++ b/test/test_irc_session/test_irc_session.cpp @@ -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() {