summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2016-10-23 15:23:14 +0100
committerPeter Powell <petpow@saberuk.com>2016-10-25 09:36:54 +0100
commit02575ecbbbd7311f7e16ed9f2f3a1c5809deefa8 (patch)
treebf1746ab85d0c59cba3544601578c170068fb20c /src/configreader.cpp
parent9d6cc28ed0921c5a2fdffce8025ce258d4befeb8 (diff)
Allow classes to take a port range.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp8
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())
{