disconnect registered slots on trigger
This commit is contained in:
parent
cc06429a69
commit
eb7b27ebe3
@ -17,6 +17,7 @@ auto Client::on_welcome(const IrcMsg &irc) -> void
|
|||||||
auto Client::on_registered() -> void
|
auto Client::on_registered() -> void
|
||||||
{
|
{
|
||||||
sig_registered();
|
sig_registered();
|
||||||
|
sig_registered.disconnect_all_slots();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Client::on_nick(const IrcMsg &irc) -> void
|
auto Client::on_nick(const IrcMsg &irc) -> void
|
||||||
|
3
main.cpp
3
main.cpp
@ -31,8 +31,7 @@ auto start(boost::asio::io_context &io, const Settings &settings) -> void
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
client->sig_registered.connect_extended([connection](auto &slot) {
|
client->sig_registered.connect([connection]() {
|
||||||
slot.disconnect();
|
|
||||||
connection->send_join("##glguy"sv);
|
connection->send_join("##glguy"sv);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user