diff --git a/include/yail/core.hpp b/include/yail/core.hpp index da67fa7..1ae9f77 100644 --- a/include/yail/core.hpp +++ b/include/yail/core.hpp @@ -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 { + 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 auto SendEvent(Event&& event) -> boost::asio::awaitable { return [&](utempl::TypeList...>>) {