implement a few commands
This commit is contained in:
@@ -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_;
|
||||
|
Reference in New Issue
Block a user