mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd: Use conf items to get this info for now.
This commit is contained in:
parent
10854b2886
commit
22471e9b4c
2 changed files with 13 additions and 3 deletions
14
ircd/net.cc
14
ircd/net.cc
|
@ -2091,8 +2091,18 @@ try
|
|||
if(!name)
|
||||
return true;
|
||||
|
||||
//TODO: XXX
|
||||
if(!m::my_host(name))
|
||||
const string_view accept[]
|
||||
{
|
||||
ircd::server_name,
|
||||
ircd::network_name,
|
||||
};
|
||||
|
||||
const bool accepts
|
||||
{
|
||||
std::find(begin(accept), end(accept), name) != end(accept)
|
||||
};
|
||||
|
||||
if(!accepts)
|
||||
{
|
||||
log::dwarning
|
||||
{
|
||||
|
|
|
@ -1442,7 +1442,7 @@ ircd::server::peer::open_links()
|
|||
try
|
||||
{
|
||||
if(unlikely(is_loop(open_opts.ipport)))
|
||||
if(!my_host(net::server_name(open_opts)))
|
||||
if(net::server_name(open_opts) != string_view{ircd::network_name})
|
||||
throw unavailable
|
||||
{
|
||||
"Won't open loopback for remote host '%s'",
|
||||
|
|
Loading…
Reference in a new issue