diff options
author | Sadie Powell <sadie@witchery.services> | 2021-03-22 14:43:05 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-03-30 09:02:47 +0100 |
commit | 8c3c4f8e8274a598b4ba573f9eabfd0940d2e88d (patch) | |
tree | 7a4ac6b6b5c2724954573f9b6f4536144814ac97 /include | |
parent | e2b0f3dc9ef4d56c71d7abda13e6139ca092e387 (diff) |
Add support for matching multiple hosts in <connect:{allow,deny}>.
Diffstat (limited to 'include')
-rw-r--r-- | include/users.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/users.h b/include/users.h index b9092b678..136874bab 100644 --- a/include/users.h +++ b/include/users.h @@ -91,10 +91,12 @@ struct CoreExport ConnectClass : public refcountbase */ unsigned int registration_timeout; - /** Host mask for this line - */ + /** Hosts that this user can connect from as a string. */ std::string host; + /** Hosts that this user can connect from as a vector. */ + std::vector<std::string> hosts; + /** Number of seconds between pings for this line */ unsigned int pingtime; @@ -166,8 +168,9 @@ struct CoreExport ConnectClass : public refcountbase /** Update the settings in this block to match the given block */ void Update(const ConnectClass* newSettings); - const std::string& GetName() { return name; } - const std::string& GetHost() { return host; } + const std::string& GetName() const { return name; } + const std::string& GetHost() const { return host; } + const std::vector<std::string>& GetHosts() const { return hosts; } /** Returns the registration timeout */ |