mirror of
https://github.com/matrix-construct/construct
synced 2024-05-19 19:33:45 +02:00
ircd::m/modules: Update various client listeners w/ callback.
This commit is contained in:
parent
02fcdc8635
commit
dd037988f3
|
@ -238,7 +238,11 @@ ircd::m::init_listener(const json::object &config,
|
|||
const string_view &name,
|
||||
const json::object &opts)
|
||||
{
|
||||
m::listeners.emplace_back(name, opts);
|
||||
m::listeners.emplace_back(name, opts, []
|
||||
(const auto &sock)
|
||||
{
|
||||
add_client(sock);
|
||||
});
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -35,7 +35,12 @@ struct listener::listen
|
|||
{
|
||||
const std::string a(args[0]);
|
||||
const ircd::json::object o(a);
|
||||
l = new net::listener(o.get("name", "js"), o);
|
||||
l = new net::listener(o.get("name", "js"), o, []
|
||||
(const auto &sock)
|
||||
{
|
||||
add_client(sock);
|
||||
});
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue