2018-08-15 01:47:42 +02:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
|
|
|
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
|
|
|
|
//
|
|
|
|
// Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice is present in all copies. The
|
|
|
|
// full license for this software is available in the LICENSE file.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#define HAVE_IRCD_M_SELF_H
|
|
|
|
|
|
|
|
namespace ircd::m::self
|
|
|
|
{
|
2019-10-01 05:50:58 +02:00
|
|
|
// Test if provided string is one of my homeserver's network_name()'s.
|
|
|
|
bool my_host(const string_view &);
|
2018-08-17 19:37:12 +02:00
|
|
|
|
2019-10-01 05:50:58 +02:00
|
|
|
// Similar to my_host(), but the comparison is relaxed to allow port
|
|
|
|
// numbers to be a factor: myself.com:8448 input will match if a homeserver
|
2019-10-04 21:48:54 +02:00
|
|
|
// here has a network_name of myself.com.
|
2018-08-15 01:47:42 +02:00
|
|
|
bool host(const string_view &);
|
2019-06-22 01:41:43 +02:00
|
|
|
|
2019-10-01 05:50:58 +02:00
|
|
|
// Alias for origin(my()); primary homeserver's network name
|
|
|
|
string_view my_host(); //__attribute__((deprecated));
|
2018-08-15 01:47:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace ircd::m
|
|
|
|
{
|
2019-10-01 05:50:58 +02:00
|
|
|
using self::my_host;
|
|
|
|
using self::host;
|
2018-08-15 01:47:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace ircd
|
|
|
|
{
|
|
|
|
using m::my_host;
|
|
|
|
}
|