From 188b70d49807f4672b7fef9a61519513fc89608f Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Wed, 18 Aug 2021 12:58:52 -0500 Subject: [PATCH] (irc) Own setting of room subject --- protocols/irc/IrcProtocol.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/protocols/irc/IrcProtocol.cpp b/protocols/irc/IrcProtocol.cpp index ea9e5bd..18200ca 100644 --- a/protocols/irc/IrcProtocol.cpp +++ b/protocols/irc/IrcProtocol.cpp @@ -349,6 +349,17 @@ IrcProtocol::Process(BMessage* msg) _SendMsg(&info); break; } + case IM_SET_ROOM_SUBJECT: + { + BString chat_id; + BString body = msg->FindString("subject"); + if (msg->FindString("chat_id", &chat_id) == B_OK) { + BString cmd("TOPIC "); + cmd << chat_id << " :" << body; + _SendIrc(cmd); + } + break; + } default: std::cout << "Unhandled message for IRC:\n"; msg->PrintToStream();