Add ChangeNick Method
This commit is contained in:
parent
0d797e04b8
commit
e6fe5b3392
1 changed files with 6 additions and 0 deletions
|
@ -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>...>>) {
|
||||
|
|
Loading…
Reference in a new issue