InspIRCd  4.0
server.h
1 /*
2  * InspIRCd -- Internet Relay Chat Daemon
3  *
4  * Copyright (C) 2019-2020 Sadie Powell <[email protected]>
5  * Copyright (C) 2018 Matt Schatz <[email protected]>
6  * Copyright (C) 2014 Attila Molnar <[email protected]>
7  *
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.
11  *
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
15  * details.
16  *
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/>.
19  */
20 
21 
22 #pragma once
23 
24 class CoreExport Server : public Cullable
25 {
26  protected:
28  const std::string id;
29 
32  const std::string name;
33 
37  std::string description;
38 
40  bool service = false;
41 
43  bool silentservice = false;
44 
47  friend class ConfigReaderThread;
48 
49  public:
50  Server(const std::string& srvid, const std::string& srvname, const std::string& srvdesc)
51  : id(srvid)
52  , name(srvname)
53  , description(srvdesc)
54  {
55  }
56 
58  const std::string& GetId() const { return id; }
59 
64  const std::string& GetName() const { return name; }
65 
69  const std::string& GetDesc() const { return description; }
70 
75  bool IsService() const { return service; }
76 
82  bool IsSilentService() const { return silentservice; }
83 };
Definition: configreader.h:503
Definition: cull.h:30
Definition: server.h:25
const std::string name
Definition: server.h:32
const std::string & GetName() const
Definition: server.h:64
const std::string & GetId() const
Definition: server.h:58
bool IsSilentService() const
Definition: server.h:82
const std::string & GetDesc() const
Definition: server.h:69
std::string description
Definition: server.h:37
bool IsService() const
Definition: server.h:75
const std::string id
Definition: server.h:28