#pragma once #include "connection.hpp" #include "ref.hpp" #include #include #include class Challenge : std::enable_shared_from_this { EVP_PKEY_Ref key_; Connection &connection_; boost::signals2::scoped_connection slot_; std::string buffer_; auto on_ircmsg(IrcCommand cmd, const IrcMsg &msg) -> void; auto finish_challenge() -> void; public: Challenge(EVP_PKEY_Ref, Connection &); static auto start(Connection &, std::string_view user, EVP_PKEY_Ref) -> std::shared_ptr; };