summaryrefslogtreecommitdiff
path: root/src/irc/client.cpp
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-04-21 16:37:31 +0500
committerilotterytea <iltsu@alright.party>2024-04-21 16:37:31 +0500
commit6572077c73406cf6c353395aad13d493929a1596 (patch)
tree5a2ab289e35391fc8a1b92b16130f6370d163dcd /src/irc/client.cpp
parent854e052b3a75bd4f77dd404341ea5c1070a2009c (diff)
feat: say() method
Diffstat (limited to 'src/irc/client.cpp')
-rw-r--r--src/irc/client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/irc/client.cpp b/src/irc/client.cpp
index 08a3ff3..dde9a5c 100644
--- a/src/irc/client.cpp
+++ b/src/irc/client.cpp
@@ -90,6 +90,10 @@ void Client::run() {
this->websocket.run();
}
+void Client::say(const std::string &channel_login, const std::string &message) {
+ this->raw("PRIVMSG #" + channel_login + " :" + message);
+}
+
bool Client::join(const std::string &channel_login) {
auto already_joined =
std::any_of(this->joined_channels.begin(), this->joined_channels.end(),