xbot/challenge.hpp

25 lines
582 B
C++
Raw Normal View History

2025-01-28 19:02:30 -08:00
#pragma once
#include "connection.hpp"
#include "ref.hpp"
#include <boost/signals2/connection.hpp>
#include <memory>
#include <string>
class Challenge : std::enable_shared_from_this<Challenge>
{
EVP_PKEY_Ref key_;
Connection &connection_;
boost::signals2::scoped_connection slot_;
std::string buffer_;
auto on_ircmsg(IrcCommand cmd, const IrcMsg &msg) -> void;
2025-01-29 09:54:17 -08:00
auto finish_challenge() -> void;
2025-01-28 19:02:30 -08:00
public:
Challenge(EVP_PKEY_Ref, Connection &);
static auto start(Connection &, std::string_view user, EVP_PKEY_Ref) -> std::shared_ptr<Challenge>;
};