diff options
author | Peter Powell <petpow@saberuk.com> | 2016-10-23 15:23:14 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2016-10-25 09:36:54 +0100 |
commit | 02575ecbbbd7311f7e16ed9f2f3a1c5809deefa8 (patch) | |
tree | bf1746ab85d0c59cba3544601578c170068fb20c /src/configreader.cpp | |
parent | 9d6cc28ed0921c5a2fdffce8025ce258d4befeb8 (diff) |
Allow classes to take a port range.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 7a1c8b8ce..9d327532b 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -328,6 +328,14 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current) me->limit = tag->getInt("limit", me->limit); me->resolvehostnames = tag->getBool("resolvehostnames", me->resolvehostnames); + std::string ports = tag->getString("port"); + if (!ports.empty()) + { + irc::portparser portrange(ports, false); + while (int port = portrange.GetToken()) + me->ports.insert(port); + } + ClassMap::iterator oldMask = oldBlocksByMask.find(typeMask); if (oldMask != oldBlocksByMask.end()) { |