aboutsummaryrefslogtreecommitdiffstats
path: root/include/users.h
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-11-03 14:48:54 +0000
committerGravatar Sadie Powell2020-11-03 19:54:13 +0000
commit89a21202de35eeec8ef464ada5e9fbb97fd83ba5 (patch)
treeb70c242c58bae562bef1d42c34c9d5d628d81208 /include/users.h
parentClean up a bunch of contructors and destructors. (diff)
Convert ConnectClass from reference<> to std::shared_ptr<>.
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/users.h b/include/users.h
index e58b18d16..9cb07f7e2 100644
--- a/include/users.h
+++ b/include/users.h
@@ -72,7 +72,7 @@ enum UserType {
/** Holds information relevant to &lt;connect allow&gt; and &lt;connect deny&gt; tags in the config file.
*/
-struct CoreExport ConnectClass : public refcountbase
+struct CoreExport ConnectClass
{
std::shared_ptr<ConfigTag> config;
/** Type of line, either CC_ALLOW or CC_DENY
@@ -160,10 +160,10 @@ struct CoreExport ConnectClass : public refcountbase
ConnectClass(std::shared_ptr<ConfigTag> tag, char type, const std::string& mask);
/** Create a new connect class with inherited settings.
*/
- ConnectClass(std::shared_ptr<ConfigTag> tag, char type, const std::string& mask, const ConnectClass& parent);
+ ConnectClass(std::shared_ptr<ConfigTag> tag, char type, const std::string& mask, std::shared_ptr<ConnectClass> parent);
/** Update the settings in this block to match the given block */
- void Update(const ConnectClass* newSettings);
+ void Update(const std::shared_ptr<ConnectClass> newSettings);
const std::string& GetName() { return name; }
const std::string& GetHost() { return host; }
@@ -707,12 +707,12 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local
/** Contains a pointer to the connect class a user is on from
*/
- reference<ConnectClass> MyClass;
+ std::shared_ptr<ConnectClass> MyClass;
/** Get the connect class which this user belongs to.
* @return A pointer to this user's connect class.
*/
- ConnectClass* GetClass() const { return MyClass; }
+ std::shared_ptr<ConnectClass> GetClass() const { return MyClass; }
/** Call this method to find the matching \<connect> for a user, and to check them against it.
*/