Add ChangeNick Method

This commit is contained in:
sha512sum 2024-10-23 18:05:18 +00:00
parent 0d797e04b8
commit e6fe5b3392

View file

@ -118,6 +118,12 @@ struct IrcClient {
co_await boost::asio::async_write(this->socket, boost::asio::buffer(request), boost::asio::transfer_all(), boost::asio::use_awaitable);
};
auto ChangeNick(std::string nick) -> boost::asio::awaitable<void> {
const auto request = std::format("NICK {}", nick);
co_await boost::asio::async_write(this->socket, boost::asio::buffer(request), boost::asio::transfer_all(), boost::asio::use_awaitable);
this->nick = std::move(nick);
};
template <typename Event>
auto SendEvent(Event&& event) -> boost::asio::awaitable<void> {
return [&]<typename... Ids, typename... FFs>(utempl::TypeList<std::tuple<Function<Ids, FFs>...>>) {