0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-30 17:34:04 +01:00
construct/include/ircd/m/self.h

38 lines
1 KiB
C
Raw Normal View History

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
{
// Test if provided string is one of my homeserver's network_name()'s.
bool my_host(const string_view &);
// 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
// here has a network_name of myself.com.
2018-08-15 01:47:42 +02:00
bool host(const string_view &);
// 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
{
using self::my_host;
using self::host;
2018-08-15 01:47:42 +02:00
}
namespace ircd
{
using m::my_host;
}