0
0
Fork 0
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:
Jason Volk 2019-09-28 14:13:58 -07:00
parent 10854b2886
commit 22471e9b4c
2 changed files with 13 additions and 3 deletions

View file

@ -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
{

View file

@ -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'",