implement a few commands

This commit is contained in:
2025-02-02 14:56:34 -08:00
parent 8c9678708b
commit 178d7dfcfe
4 changed files with 172 additions and 43 deletions

View File

@@ -18,6 +18,15 @@ struct Bot : std::enable_shared_from_this<Bot>
std::string_view account;
std::string_view command;
std::string_view arguments;
auto nick() const -> std::string_view {
auto bang = source.find('!');
if (bang == std::string::npos) {
return "";
} else {
return source.substr(0, bang);
}
}
};
std::shared_ptr<Client> self_;