#pragma once #include "client.hpp" #include #include struct Command { std::string_view source; std::string_view target; std::string_view oper; std::string_view account; std::string_view command; std::string_view arguments; }; struct Bot : std::enable_shared_from_this { std::shared_ptr self_; char command_prefix_; boost::signals2::signal sig_command; Bot(std::shared_ptr self) : self_{std::move(self)} , command_prefix_{'!'} {} auto on_chat(const Chat &) -> void; auto process_command(std::string_view message, const Chat &msg) -> void; static auto start(std::shared_ptr) -> std::shared_ptr; auto shutdown() -> void; };