xbot/command_thread.hpp

31 lines
549 B
C++
Raw Normal View History

2023-11-26 19:59:12 -08:00
#pragma once
2023-11-27 14:12:20 -08:00
#include "event.hpp"
2023-11-26 19:59:12 -08:00
2023-11-27 19:09:45 -08:00
#include <string_view>
2023-11-26 19:59:12 -08:00
class Connection;
struct CommandEvent : Event
{
2025-01-22 20:33:17 -08:00
/// @brief oper account of sender
2023-11-26 19:59:12 -08:00
std::string_view oper;
2025-01-22 20:33:17 -08:00
/// @brief nickserv acccount of sender
2023-11-26 19:59:12 -08:00
std::string_view account;
2025-01-22 20:33:17 -08:00
/// @brief nickname of sender
2023-11-26 19:59:12 -08:00
std::string_view nick;
2025-01-22 20:33:17 -08:00
/// @brief command name excluding sigil
2023-11-26 19:59:12 -08:00
std::string_view command;
2025-01-22 20:33:17 -08:00
/// @brief complete argument excluding space after command
std::string_view arg;
2023-11-26 19:59:12 -08:00
};
struct CommandThread
{
static auto start(Connection&) -> void;
2023-11-27 14:12:20 -08:00
};