2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2019-2020 Sadie Powell <sadie@witchery.services>
5 * Copyright (C) 2018 Matt Schatz <genius3000@g3k.solutions>
6 * Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
8 * This file is part of InspIRCd. InspIRCd is free software: you can
9 * redistribute it and/or modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation, version 2.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 class CoreExport Server : public classbase
27 /** The unique identifier for this server. */
30 /** The name of this server
32 const std::string name;
34 /** The description of this server.
35 * This can be updated by the protocol module (for remote servers) or by a rehash (for the local server).
37 std::string description;
39 /** True if this server is ulined
43 /** True if this server is a silent uline, i.e. silent="yes" in the uline block
47 /** Allow ConfigReaderThread to update the description on a rehash
49 friend class ConfigReaderThread;
52 Server(const std::string& srvid, const std::string& srvname, const std::string& srvdesc)
55 , description(srvdesc)
61 DEPRECATED_METHOD(Server(const std::string& srvname, const std::string& srvdesc))
63 , description(srvdesc)
69 /** Retrieves the unique identifier for this server (e.g. 36C). */
70 const std::string& GetId() const { return id; }
73 * Returns the name of this server
74 * @return The name of this server, for example "irc.inspircd.org".
76 const std::string& GetName() const { return name; }
78 /** Returns the description of this server
79 * @return The description of this server
81 const std::string& GetDesc() const { return description; }
84 * Checks whether this server is ulined
85 * @return True if this server is ulined, false otherwise.
87 bool IsULine() const { return uline; }
90 * Checks whether this server is a silent uline
91 * Silent uline servers introduce, quit and oper up users without a snotice being generated.
92 * @return True if this server is a silent uline, false otherwise.
94 bool IsSilentULine() const { return silentuline; }