summaryrefslogtreecommitdiff
path: root/src/irc/irc_client.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/irc_client.hpp')
-rw-r--r--src/irc/irc_client.hpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/irc/irc_client.hpp b/src/irc/irc_client.hpp
index cfb3d21..e2ad8b9 100644
--- a/src/irc/irc_client.hpp
+++ b/src/irc/irc_client.hpp
@@ -1,8 +1,9 @@
#pragma once
-
#include <irc/irc_message.hpp>
#include <irc/irc_channel.hpp>
+#include <irc/capability.hpp>
+#include <irc/sasl.hpp>
#include <irc/iid.hpp>
#include <bridge/history_limit.hpp>
@@ -232,6 +233,17 @@ public:
*/
void on_invited(const IrcMessage& message);
/**
+ * The IRC server sends a CAP message, as part of capabilities negociation. It could be a ACK,
+ * NACK, or something else
+ */
+ void on_cap(const IrcMessage& message);
+private:
+ void cap_end();
+public:
+ void on_authenticate(const IrcMessage& message);
+ void on_sasl_success(const IrcMessage& message);
+ void on_sasl_login(const IrcMessage& message);
+ /**
* The channel has been completely joined (self presence, topic, all names
* received etc), send the self presence and topic to the XMPP user.
*/
@@ -360,6 +372,12 @@ private:
*/
bool welcomed;
/**
+ * Whether or not we are trying to authenticate using sasl. If this is true we need to wait for a
+ * successful auth
+ */
+ SaslState sasl_state{SaslState::unneeded};
+ std::map<std::string, Capability> capabilities;
+ /**
* See http://www.irc.org/tech_docs/draft-brocklesby-irc-isupport-03.txt section 3.3
* We store the possible chanmodes in this object.
* chanmodes[0] contains modes of type A, [1] of type B etc