25 lines
570 B
C++
25 lines
570 B
C++
#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;
|
|
|
|
public:
|
|
Challenge(EVP_PKEY_Ref, Connection &);
|
|
auto stop() -> void;
|
|
static auto start(Connection &, std::string_view user, EVP_PKEY_Ref) -> std::shared_ptr<Challenge>;
|
|
};
|